PHP Interface Adldap\Connections\ConnectionInterface

Interface ConnectionInterface
Afficher le fichier Open project: adldap2/adldap2 Interface Usage Examples

Méthodes publiques

Méthode Description
add ( string $dn, array $entry ) : boolean Adds an entry to the current connection.
bind ( string $username, string $password, boolean $sasl = false ) : boolean Binds to the current connection using the specified username and password. If sasl is true, the current connection is bound using SASL.
canChangePasswords ( ) : boolean Returns true / false if the current connection is able to modify passwords.
close ( ) : boolean Closes the current connection.
compare ( string $dn, string $attribute, string $value ) : mixed Compare value of attribute found in entry specified with DN.
connect ( string | array $hostname = [], integer $port = 389 ) : mixed Connects to the specified hostname using the specified port.
controlPagedResult ( integer $pageSize = 1000, boolean $isCritical = false, string $cookie = '' ) : mixed Send LDAP pagination control.
controlPagedResultResponse ( $result, string &$cookie ) : mixed Retrieve a paginated result response.
countEntries ( $searchResult ) : integer Returns the number of entries from a search result.
delete ( string $dn ) : boolean Deletes an entry on the current connection.
err2Str ( integer $number ) : string Returns the error string of the specified error number.
errNo ( ) : integer Returns the error number of the last command executed on the current connection.
extractDiagnosticCode ( string $message ) : string | boolean Extract the diagnostic code from the message.
getAttributes ( $entry ) : mixed Retrieves the ldap entry's attributes.
getConnection ( ) : mixed Get the current connection.
getDiagnosticMessage ( ) : string Return the diagnostic Message.
getEntries ( $searchResult ) : mixed Retrieve the entries from a search result.
getExtendedError ( ) : string Returns the extended error string of the last command.
getExtendedErrorCode ( ) : string Returns the extended error code of the last command.
getExtendedErrorHex ( ) : string | null Returns the extended error hex code of the last command.
getFirstEntry ( $searchResult ) : mixed Retrieves the first entry from a search result.
getLastError ( ) : string Retrieve the last error on the current connection.
getNextEntry ( $entry ) : mixed Retrieves the next entry from a search result.
getValuesLen ( $entry, $attribute ) : array Get all binary values from the specified result entry.
isBatchSupported ( ) : boolean Returns true / false if the current connection supports batch modification.
isBound ( ) : boolean Returns true / false if the current connection is bound.
isPagingSupported ( ) : boolean Returns true / false if the current connection pagination.
isSaslSupported ( ) : boolean Returns true / false if the current connection supports SASL for single sign on capability.
isSupported ( ) : boolean Returns true / false if the current connection is supported on the current PHP install.
isUsingSSL ( ) : boolean Returns true / false if the current connection instance is using SSL.
isUsingTLS ( ) : boolean Returns true / false if the current connection instance is using TLS.
listing ( string $dn, string $filter, array $attributes ) : mixed Performs a single level search on the current connection.
modAdd ( string $dn, array $entry ) : mixed Add attribute values to current attributes.
modDelete ( string $dn, array $entry ) : mixed Delete attribute values from current attributes.
modReplace ( string $dn, array $entry ) : mixed Replaces attribute values with new ones.
modify ( string $dn, array $entry ) : boolean Modifies an existing entry on the current connection.
modifyBatch ( string $dn, array $values ) : mixed Batch modifies an existing entry on the current connection.
read ( string $dn, $filter, array $fields ) : mixed Reads an entry on the current connection.
rename ( string $dn, string $newRdn, string $newParent, boolean $deleteOldRdn = false ) : boolean Modify the name of an entry on the current connection.
search ( string $dn, string $filter, array $fields ) : mixed
setOption ( integer $option, mixed $value ) : mixed Sets an option on the current connection.
setOptions ( array $options = [] ) : mixed Sets options on the current connection.
setRebindCallback ( callable $callback ) : boolean Set a callback function to do re-binds on referral chasing.
ssl ( boolean $enabled = true ) : Adldap\Connections\ConnectionInterface Sets the current connection to use SSL.
startTLS ( ) : mixed Starts a connection using TLS.
tls ( boolean $enabled = true ) : Adldap\Connections\ConnectionInterface Sets the current connection to use TLS.

Method Details

add() public méthode

Adds an entry to the current connection.
public add ( string $dn, array $entry ) : boolean
$dn string
$entry array
Résultat boolean

bind() public méthode

Binds to the current connection using the specified username and password. If sasl is true, the current connection is bound using SASL.
public bind ( string $username, string $password, boolean $sasl = false ) : boolean
$username string
$password string
$sasl boolean
Résultat boolean

canChangePasswords() public méthode

Returns true / false if the current connection is able to modify passwords.
public canChangePasswords ( ) : boolean
Résultat boolean

close() public méthode

Returns false if no connection is present.
public close ( ) : boolean
Résultat boolean

compare() public méthode

Compare value of attribute found in entry specified with DN.
public compare ( string $dn, string $attribute, string $value ) : mixed
$dn string
$attribute string
$value string
Résultat mixed

connect() public méthode

Connects to the specified hostname using the specified port.
public connect ( string | array $hostname = [], integer $port = 389 ) : mixed
$hostname string | array
$port integer
Résultat mixed

controlPagedResult() public méthode

Send LDAP pagination control.
public controlPagedResult ( integer $pageSize = 1000, boolean $isCritical = false, string $cookie = '' ) : mixed
$pageSize integer
$isCritical boolean
$cookie string
Résultat mixed

controlPagedResultResponse() public méthode

Retrieve a paginated result response.
public controlPagedResultResponse ( $result, string &$cookie ) : mixed
$result
$cookie string
Résultat mixed

countEntries() public méthode

Returns the number of entries from a search result.
public countEntries ( $searchResult ) : integer
$searchResult
Résultat integer

delete() public méthode

Deletes an entry on the current connection.
public delete ( string $dn ) : boolean
$dn string
Résultat boolean

err2Str() public méthode

Returns the error string of the specified error number.
public err2Str ( integer $number ) : string
$number integer
Résultat string

errNo() public méthode

Returns the error number of the last command executed on the current connection.
public errNo ( ) : integer
Résultat integer

extractDiagnosticCode() public méthode

Extract the diagnostic code from the message.
public extractDiagnosticCode ( string $message ) : string | boolean
$message string
Résultat string | boolean

getAttributes() public méthode

Retrieves the ldap entry's attributes.
public getAttributes ( $entry ) : mixed
$entry
Résultat mixed

getConnection() public méthode

Get the current connection.
public getConnection ( ) : mixed
Résultat mixed

getDiagnosticMessage() public méthode

Return the diagnostic Message.
public getDiagnosticMessage ( ) : string
Résultat string

getEntries() public méthode

Retrieve the entries from a search result.
public getEntries ( $searchResult ) : mixed
$searchResult
Résultat mixed

getExtendedError() public méthode

Returns the extended error string of the last command.
public getExtendedError ( ) : string
Résultat string

getExtendedErrorCode() public méthode

Returns the extended error code of the last command.
public getExtendedErrorCode ( ) : string
Résultat string

getExtendedErrorHex() public méthode

Returns the extended error hex code of the last command.
public getExtendedErrorHex ( ) : string | null
Résultat string | null

getFirstEntry() public méthode

Retrieves the first entry from a search result.
public getFirstEntry ( $searchResult ) : mixed
$searchResult
Résultat mixed

getLastError() public méthode

Retrieve the last error on the current connection.
public getLastError ( ) : string
Résultat string

getNextEntry() public méthode

Retrieves the next entry from a search result.
public getNextEntry ( $entry ) : mixed
$entry
Résultat mixed

getValuesLen() public méthode

Get all binary values from the specified result entry.
public getValuesLen ( $entry, $attribute ) : array
$entry
$attribute
Résultat array

isBatchSupported() public méthode

Returns true / false if the current connection supports batch modification.
public isBatchSupported ( ) : boolean
Résultat boolean

isBound() public méthode

Returns true / false if the current connection is bound.
public isBound ( ) : boolean
Résultat boolean

isPagingSupported() public méthode

Returns true / false if the current connection pagination.
public isPagingSupported ( ) : boolean
Résultat boolean

isSaslSupported() public méthode

Returns true / false if the current connection supports SASL for single sign on capability.
public isSaslSupported ( ) : boolean
Résultat boolean

isSupported() public méthode

Returns true / false if the current connection is supported on the current PHP install.
public isSupported ( ) : boolean
Résultat boolean

isUsingSSL() public méthode

Returns true / false if the current connection instance is using SSL.
public isUsingSSL ( ) : boolean
Résultat boolean

isUsingTLS() public méthode

Returns true / false if the current connection instance is using TLS.
public isUsingTLS ( ) : boolean
Résultat boolean

listing() public méthode

Performs a single level search on the current connection.
public listing ( string $dn, string $filter, array $attributes ) : mixed
$dn string
$filter string
$attributes array
Résultat mixed

modAdd() public méthode

Add attribute values to current attributes.
public modAdd ( string $dn, array $entry ) : mixed
$dn string
$entry array
Résultat mixed

modDelete() public méthode

Delete attribute values from current attributes.
public modDelete ( string $dn, array $entry ) : mixed
$dn string
$entry array
Résultat mixed

modReplace() public méthode

Replaces attribute values with new ones.
public modReplace ( string $dn, array $entry ) : mixed
$dn string
$entry array
Résultat mixed

modify() public méthode

Modifies an existing entry on the current connection.
public modify ( string $dn, array $entry ) : boolean
$dn string
$entry array
Résultat boolean

modifyBatch() public méthode

Batch modifies an existing entry on the current connection.
public modifyBatch ( string $dn, array $values ) : mixed
$dn string
$values array
Résultat mixed

read() public méthode

Reads an entry on the current connection.
public read ( string $dn, $filter, array $fields ) : mixed
$dn string
$filter
$fields array
Résultat mixed

rename() public méthode

Modify the name of an entry on the current connection.
public rename ( string $dn, string $newRdn, string $newParent, boolean $deleteOldRdn = false ) : boolean
$dn string
$newRdn string
$newParent string
$deleteOldRdn boolean
Résultat boolean

setOption() public méthode

Sets an option on the current connection.
public setOption ( integer $option, mixed $value ) : mixed
$option integer
$value mixed
Résultat mixed

setOptions() public méthode

Sets options on the current connection.
public setOptions ( array $options = [] ) : mixed
$options array
Résultat mixed

setRebindCallback() public méthode

Set a callback function to do re-binds on referral chasing.
public setRebindCallback ( callable $callback ) : boolean
$callback callable
Résultat boolean

ssl() public méthode

Sets the current connection to use SSL.
public ssl ( boolean $enabled = true ) : Adldap\Connections\ConnectionInterface
$enabled boolean
Résultat Adldap\Connections\ConnectionInterface

startTLS() public méthode

Starts a connection using TLS.
public startTLS ( ) : mixed
Résultat mixed

tls() public méthode

Sets the current connection to use TLS.
public tls ( boolean $enabled = true ) : Adldap\Connections\ConnectionInterface
$enabled boolean
Résultat Adldap\Connections\ConnectionInterface