PHP Class LdapTools\Connection\LdapConnection

Author: Chad Sikorra ([email protected])
Inheritance: implements LdapTools\Connection\LdapConnectionInterface
Datei anzeigen Open project: ldaptools/ldaptools

Protected Properties

Property Type Description
$config LdapTools\DomainConfiguration
$connection resource
$dispatcher LdapTools\Event\EventDispatcherInterface
$isBound Whether the connection is bound using a username/password
$lastActivity DateTime | null
$logger LdapTools\Log\LdapLoggerInterface | null
$rootDse LdapTools\Object\LdapObject | null
$server The LDAP server that we are currently connected to.
$serverPool LdapServerPool
$usernameFormatter LdapTools\Connection\AD\ADBindUserStrategy | BindUserStrategy

Public Methods

Method Description
__construct ( DomainConfiguration $config, LdapTools\Event\EventDispatcherInterface $dispatcher = null, LdapTools\Log\LdapLoggerInterface $logger = null )
close ( )
connect ( $username = null, $password = null, $anonymous = false, $server = null )
execute ( LdapTools\Operation\LdapOperationInterface $operation )
getConfig ( )
getConnection ( )
getDiagnosticMessage ( )
getExtendedErrorNumber ( )
getIdleTime ( )
getLastError ( )
getRootDse ( )
getServer ( )
isBound ( )
setControl ( LdapControl $control )

Protected Methods

Method Description
bind ( string $username, string $password, boolean $anonymous = false ) Binds to LDAP with the supplied credentials or anonymously if specified.
getLdapUrl ( null | string $server = null ) : string[] Get the LDAP URL to connect to.
initiateLdapConnection ( null | string $server = null ) Makes the initial connection to LDAP, sets connection options, and starts TLS if specified.
setupOperationInvoker ( ) Sets the needed objects on the operation invoker.

Method Details

__construct() public method

public __construct ( DomainConfiguration $config, LdapTools\Event\EventDispatcherInterface $dispatcher = null, LdapTools\Log\LdapLoggerInterface $logger = null )
$config LdapTools\DomainConfiguration
$dispatcher LdapTools\Event\EventDispatcherInterface
$logger LdapTools\Log\LdapLoggerInterface

bind() protected method

Binds to LDAP with the supplied credentials or anonymously if specified.
protected bind ( string $username, string $password, boolean $anonymous = false )
$username string The username to bind with.
$password string The password to bind with.
$anonymous boolean Whether this is an anonymous bind attempt.

close() public method

public close ( )

connect() public method

public connect ( $username = null, $password = null, $anonymous = false, $server = null )

execute() public method

public execute ( LdapTools\Operation\LdapOperationInterface $operation )
$operation LdapTools\Operation\LdapOperationInterface

getConfig() public method

public getConfig ( )

getConnection() public method

public getConnection ( )

getDiagnosticMessage() public method

getExtendedErrorNumber() public method

getIdleTime() public method

public getIdleTime ( )

getLastError() public method

public getLastError ( )

getLdapUrl() protected method

Get the LDAP URL to connect to.
protected getLdapUrl ( null | string $server = null ) : string[]
$server null | string
return string[]

getRootDse() public method

public getRootDse ( )

getServer() public method

public getServer ( )

initiateLdapConnection() protected method

Makes the initial connection to LDAP, sets connection options, and starts TLS if specified.
protected initiateLdapConnection ( null | string $server = null )
$server null | string

isBound() public method

public isBound ( )

setControl() public method

public setControl ( LdapControl $control )
$control LdapControl

setupOperationInvoker() protected method

Sets the needed objects on the operation invoker.
protected setupOperationInvoker ( )

Property Details

$config protected_oe property

protected DomainConfiguration,LdapTools $config
return LdapTools\DomainConfiguration

$connection protected_oe property

protected resource $connection
return resource

$dispatcher protected_oe property

protected EventDispatcherInterface,LdapTools\Event $dispatcher
return LdapTools\Event\EventDispatcherInterface

$isBound protected_oe property

Whether the connection is bound using a username/password
protected $isBound

$lastActivity protected_oe property

protected DateTime|null $lastActivity
return DateTime | null

$logger protected_oe property

protected LdapLoggerInterface,LdapTools\Log|null $logger
return LdapTools\Log\LdapLoggerInterface | null

$rootDse protected_oe property

protected LdapObject,LdapTools\Object|null $rootDse
return LdapTools\Object\LdapObject | null

$server protected_oe property

The LDAP server that we are currently connected to.
protected $server

$serverPool protected_oe property

protected LdapServerPool,LdapTools\Connection $serverPool
return LdapServerPool

$usernameFormatter protected_oe property

protected ADBindUserStrategy,LdapTools\Connection\AD|BindUserStrategy,LdapTools\Connection $usernameFormatter
return LdapTools\Connection\AD\ADBindUserStrategy | BindUserStrategy