PHP Класс LdapTools\Connection\LdapServerPool

Автор: Chad Sikorra ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$config LdapTools\DomainConfiguration
$dns LdapTools\Utilities\Dns
$selectionMethod The method to use when ordering the servers array.
$tcp LdapTools\Utilities\TcpSocket

Открытые методы

Метод Описание
__construct ( DomainConfiguration $config, TcpSocket $tcp = null, Dns $dns = null )
getSelectionMethod ( ) : string Get the selection method for checking servers.
getServer ( ) : string Retrieve the first available LDAP server.
getSortedServersArray ( ) : array Uses the selected method to decide how to return the server array for the check.
setSelectionMethod ( string $method ) Set the selection method for checking servers (ie. 'random', 'order').

Защищенные методы

Метод Описание
getServersFromDns ( ) : array Attempt to lookup the LDAP servers from the DNS name.
isServerAvailable ( string $server ) : boolean Check if a LDAP server is up and available.
shuffleServers ( array $servers ) : array Returns a randomized array of the servers.

Описание методов

__construct() публичный метод

public __construct ( DomainConfiguration $config, TcpSocket $tcp = null, Dns $dns = null )
$config LdapTools\DomainConfiguration
$tcp LdapTools\Utilities\TcpSocket
$dns LdapTools\Utilities\Dns

getSelectionMethod() публичный метод

Get the selection method for checking servers.
public getSelectionMethod ( ) : string
Результат string

getServer() публичный метод

Retrieve the first available LDAP server.
public getServer ( ) : string
Результат string

getServersFromDns() защищенный метод

Attempt to lookup the LDAP servers from the DNS name.
protected getServersFromDns ( ) : array
Результат array The LDAP servers.

getSortedServersArray() публичный метод

Uses the selected method to decide how to return the server array for the check.
public getSortedServersArray ( ) : array
Результат array

isServerAvailable() защищенный метод

Check if a LDAP server is up and available.
protected isServerAvailable ( string $server ) : boolean
$server string
Результат boolean

setSelectionMethod() публичный метод

Set the selection method for checking servers (ie. 'random', 'order').
public setSelectionMethod ( string $method )
$method string

shuffleServers() защищенный метод

Returns a randomized array of the servers.
protected shuffleServers ( array $servers ) : array
$servers array
Результат array

Описание свойств

$config защищенное свойство

protected DomainConfiguration,LdapTools $config
Результат LdapTools\DomainConfiguration

$dns защищенное свойство

protected Dns,LdapTools\Utilities $dns
Результат LdapTools\Utilities\Dns

$selectionMethod защищенное свойство

The method to use when ordering the servers array.
protected $selectionMethod

$tcp защищенное свойство

protected TcpSocket,LdapTools\Utilities $tcp
Результат LdapTools\Utilities\TcpSocket