public function exists($name, $data)
    {
        $servers = isset($this->config['servers']) ? $this->config['servers'] : null;

        if ((!$name || ($name && $name !== $data['name'])) &&
            isset($data['name']) && isset($servers[$data['name']])
        ) {
            return true;
        }
    }
public function exists($name, $data)
    {
        $servers = isset($this->config['servers']) ? $this->config['servers'] : null;

        if ((!$name || ($name && $name !== $data['name'])) &&
            isset($data['name']) && isset($servers[$data['name']])
        ) {
            return true;
        }
    }
public function exists ( $ name , $ data ) { $ servers = isset ( $ this -> config [ 'servers' ] ) ? $ this -> config [ 'servers' ] : null ; if ( ( ! $ name || ( $ name && $ name !== $ data [ 'name' ] ) ) && isset ( $ data [ 'name' ] ) && isset ( $ servers [ $ data [ 'name' ] ] ) ) { return true ; } }
Test if a given server name exist in LDAP configuration.

@param name The name of the server
@param data An array containing LDAP informations as host, port or dn

@return bool
Test if a given server name exist in LDAP configuration .