PHP Interface Adldap\Connections\ConnectionInterface

Interface ConnectionInterface
ファイルを表示 Open project: adldap2/adldap2 Interface Usage Examples

Public Methods

Method 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 method

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

bind() public method

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
return boolean

canChangePasswords() public method

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

close() public method

Returns false if no connection is present.
public close ( ) : boolean
return boolean

compare() public method

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
return mixed

connect() public method

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

controlPagedResult() public method

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

controlPagedResultResponse() public method

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

countEntries() public method

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

delete() public method

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

err2Str() public method

Returns the error string of the specified error number.
public err2Str ( integer $number ) : string
$number integer
return string

errNo() public method

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

extractDiagnosticCode() public method

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

getAttributes() public method

Retrieves the ldap entry's attributes.
public getAttributes ( $entry ) : mixed
$entry
return mixed

getConnection() public method

Get the current connection.
public getConnection ( ) : mixed
return mixed

getDiagnosticMessage() public method

Return the diagnostic Message.
public getDiagnosticMessage ( ) : string
return string

getEntries() public method

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

getExtendedError() public method

Returns the extended error string of the last command.
public getExtendedError ( ) : string
return string

getExtendedErrorCode() public method

Returns the extended error code of the last command.
public getExtendedErrorCode ( ) : string
return string

getExtendedErrorHex() public method

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

getFirstEntry() public method

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

getLastError() public method

Retrieve the last error on the current connection.
public getLastError ( ) : string
return string

getNextEntry() public method

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

getValuesLen() public method

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

isBatchSupported() public method

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

isBound() public method

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

isPagingSupported() public method

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

isSaslSupported() public method

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

isSupported() public method

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

isUsingSSL() public method

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

isUsingTLS() public method

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

listing() public method

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

modAdd() public method

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

modDelete() public method

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

modReplace() public method

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

modify() public method

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

modifyBatch() public method

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

read() public method

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

rename() public method

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
return boolean

setOption() public method

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

setOptions() public method

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

setRebindCallback() public method

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

ssl() public method

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

startTLS() public method

Starts a connection using TLS.
public startTLS ( ) : mixed
return mixed

tls() public method

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