PHP Интерфейс LdapTools\Connection\LdapConnectionInterface

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

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

Метод Описание
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.

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

close() публичный Метод

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

connect() публичный Метод

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() публичный Метод

Execute an operation against LDAP (Add, Modify, Delete, Move, Query, etc).
public execute ( LdapTools\Operation\LdapOperationInterface $operation ) : mixed
$operation LdapTools\Operation\LdapOperationInterface
Результат mixed

getConfig() публичный Метод

Get the DomainConfiguration instance in use by the connection.
public getConfig ( ) : DomainConfiguration
Результат LdapTools\DomainConfiguration

getConnection() публичный Метод

Get the LDAP connection resource.
public getConnection ( ) : resource
Результат resource

getDiagnosticMessage() публичный Метод

Get the full diagnostic message from the LDAP server for the last operation.
public getDiagnosticMessage ( ) : string
Результат string

getExtendedErrorNumber() публичный Метод

Get the extended error number from LDAP for the last operation.
public getExtendedErrorNumber ( ) : integer
Результат integer

getIdleTime() публичный Метод

Get the time, in seconds, that the connection has been idle. If not connected this will always return 0.
public getIdleTime ( ) : integer
Результат integer

getLastError() публичный Метод

Get the message from the LDAP server for the last operation.
public getLastError ( ) : string
Результат string

getRootDse() публичный Метод

Return a RootDse LDAP object for this connection.
public getRootDse ( ) : LdapObject
Результат LdapTools\Object\LdapObject

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

Get the LDAP server that the connection is currently connected to.
public getServer ( ) : string | null
Результат string | null

isBound() публичный Метод

Determine whether the connection is currently bound to LDAP with a username/password.
public isBound ( ) : boolean
Результат boolean

setControl() публичный Метод

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