public function getServer()
    {
        $servers = $this->getSortedServersArray();

        foreach ($servers as $server) {
            if ($this->isServerAvailable($server)) {
                return $server;
            }
        }

        throw new LdapConnectionException('No LDAP server is available.');
    }