PHP Class LdapTools\Connection\LdapServerPool

Author: Chad Sikorra ([email protected])
Afficher le fichier Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Свойство Type Description
$config LdapTools\DomainConfiguration
$dns LdapTools\Utilities\Dns
$selectionMethod The method to use when ordering the servers array.
$tcp LdapTools\Utilities\TcpSocket

Méthodes publiques

Méthode Description
__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').

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

getSelectionMethod() public méthode

Get the selection method for checking servers.
public getSelectionMethod ( ) : string
Résultat string

getServer() public méthode

Retrieve the first available LDAP server.
public getServer ( ) : string
Résultat string

getServersFromDns() protected méthode

Attempt to lookup the LDAP servers from the DNS name.
protected getServersFromDns ( ) : array
Résultat array The LDAP servers.

getSortedServersArray() public méthode

Uses the selected method to decide how to return the server array for the check.
public getSortedServersArray ( ) : array
Résultat array

isServerAvailable() protected méthode

Check if a LDAP server is up and available.
protected isServerAvailable ( string $server ) : boolean
$server string
Résultat boolean

setSelectionMethod() public méthode

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

shuffleServers() protected méthode

Returns a randomized array of the servers.
protected shuffleServers ( array $servers ) : array
$servers array
Résultat array

Property Details

$config protected_oe property

protected DomainConfiguration,LdapTools $config
Résultat LdapTools\DomainConfiguration

$dns protected_oe property

protected Dns,LdapTools\Utilities $dns
Résultat LdapTools\Utilities\Dns

$selectionMethod protected_oe property

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

$tcp protected_oe property

protected TcpSocket,LdapTools\Utilities $tcp
Résultat LdapTools\Utilities\TcpSocket