PHP Interface LdapTools\Connection\LdapConnectionInterface

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

Méthodes publiques

Méthode Description
close ( ) If the connection is bound, this closes the LDAP connection.
connect ( string | null $username = null, string | null $password = null, boolean $anonymous = false, string | null $server = null ) Connect and bind to LDAP.
execute ( LdapTools\Operation\LdapOperationInterface $operation ) : mixed Execute an operation against LDAP (Add, Modify, Delete, Move, Query, etc).
getConfig ( ) : DomainConfiguration Get the DomainConfiguration instance in use by the connection.
getConnection ( ) : resource Get the LDAP connection resource.
getDiagnosticMessage ( ) : string Get the full diagnostic message from the LDAP server for the last operation.
getExtendedErrorNumber ( ) : integer Get the extended error number from LDAP for the last operation.
getIdleTime ( ) : integer Get the time, in seconds, that the connection has been idle. If not connected this will always return 0.
getLastError ( ) : string Get the message from the LDAP server for the last operation.
getRootDse ( ) : LdapObject Return a RootDse LDAP object for this connection.
getServer ( ) : string | null Get the LDAP server that the connection is currently connected to.
isBound ( ) : boolean Determine whether the connection is currently bound to LDAP with a username/password.
setControl ( LdapControl $control ) Set the LDAP control for the connection.

Method Details

close() public méthode

If the connection is bound, this closes the LDAP connection.
public close ( )

connect() public méthode

Connect and bind to LDAP.
public connect ( string | null $username = null, string | null $password = null, boolean $anonymous = false, string | null $server = null )
$username string | null The username to connect with. If not specified, the one in the config is used.
$password string | null The password for the username.
$anonymous boolean Whether this is an attempt to bind anonymously, ignoring the username and password.
$server string | null The server to connect to. If not specified, the server(s) in the config are used.

execute() public méthode

Execute an operation against LDAP (Add, Modify, Delete, Move, Query, etc).
public execute ( LdapTools\Operation\LdapOperationInterface $operation ) : mixed
$operation LdapTools\Operation\LdapOperationInterface
Résultat mixed

getConfig() public méthode

Get the DomainConfiguration instance in use by the connection.
public getConfig ( ) : DomainConfiguration
Résultat LdapTools\DomainConfiguration

getConnection() public méthode

Get the LDAP connection resource.
public getConnection ( ) : resource
Résultat resource

getDiagnosticMessage() public méthode

Get the full diagnostic message from the LDAP server for the last operation.
public getDiagnosticMessage ( ) : string
Résultat string

getExtendedErrorNumber() public méthode

Get the extended error number from LDAP for the last operation.
public getExtendedErrorNumber ( ) : integer
Résultat integer

getIdleTime() public méthode

Get the time, in seconds, that the connection has been idle. If not connected this will always return 0.
public getIdleTime ( ) : integer
Résultat integer

getLastError() public méthode

Get the message from the LDAP server for the last operation.
public getLastError ( ) : string
Résultat string

getRootDse() public méthode

Return a RootDse LDAP object for this connection.
public getRootDse ( ) : LdapObject
Résultat LdapTools\Object\LdapObject

getServer() public méthode

Get the LDAP server that the connection is currently connected to.
public getServer ( ) : string | null
Résultat string | null

isBound() public méthode

Determine whether the connection is currently bound to LDAP with a username/password.
public isBound ( ) : boolean
Résultat boolean

setControl() public méthode

Set the LDAP control for the connection.
public setControl ( LdapControl $control )
$control LdapControl