PHP Class Adldap\Connections\Ldap

Class LDAP
Inheritance: implements Adldap\Interfaces\ConnectionInterface, use trait Adldap\Traits\LdapFunctionSupportTrait
显示文件 Open project: adldap2/adldap2 Class Usage Examples

Protected Properties

Property Type Description
$bound boolean Stores the bool whether or not the current connection is bound.
$connection resource The active LDAP connection.
$useSSL boolean To use SSL, your server must support LDAP over SSL. http://adldap.sourceforge.net/wiki/doku.php?id=ldap_over_ssl
$useTLS boolean If you wish to use TLS you should ensure that $useSSL is set to false and vice-versa

Public Methods

Method Description
add ( $dn, array $entry )
bind ( $username, $password, $sasl = false )
canChangePasswords ( )
close ( )
compare ( $dn, $attribute, $value )
connect ( $hosts = [], $port = '389' )
controlPagedResult ( $pageSize = 1000, $isCritical = false, $cookie = '' )
controlPagedResultResponse ( $result, &$cookie )
countEntries ( $searchResults )
delete ( $dn )
err2Str ( $number )
errNo ( )
extractDiagnosticCode ( $message )
getAttributes ( $entry )
getConnection ( )
getDiagnosticMessage ( )
getEntries ( $searchResults )
getExtendedError ( )
getExtendedErrorCode ( )
getExtendedErrorHex ( )
getFirstEntry ( $searchResults )
getLastError ( )
getNextEntry ( $entry )
getProtocol ( ) : string Returns the LDAP protocol to utilize for the current connection.
getValuesLen ( $entry, $attribute )
isBound ( )
isUsingSSL ( )
isUsingTLS ( )
listing ( $dn, $filter, array $attributes )
modAdd ( $dn, array $entry )
modDelete ( $dn, array $entry )
modReplace ( $dn, array $entry )
modify ( $dn, array $entry )
modifyBatch ( $dn, array $values )
read ( $dn, $filter, array $fields )
rename ( $dn, $newRdn, $newParent, $deleteOldRdn = false )
search ( $dn, $filter, array $fields )
setOption ( $option, $value )
setOptions ( array $options = [] )
setRebindCallback ( callable $callback )
ssl ( $enabled = true )
startTLS ( )
tls ( $enabled = true )

Protected Methods

Method Description
getConnectionString ( string | array $hosts = [], string $protocol, string $port ) : string Generates an LDAP connection string for each host given.

Method Details

add() public method

public add ( $dn, array $entry )
$entry array

bind() public method

public bind ( $username, $password, $sasl = false )

canChangePasswords() public method

public canChangePasswords ( )

close() public method

public close ( )

compare() public method

public compare ( $dn, $attribute, $value )

connect() public method

public connect ( $hosts = [], $port = '389' )

controlPagedResult() public method

public controlPagedResult ( $pageSize = 1000, $isCritical = false, $cookie = '' )

controlPagedResultResponse() public method

public controlPagedResultResponse ( $result, &$cookie )

countEntries() public method

public countEntries ( $searchResults )

delete() public method

public delete ( $dn )

err2Str() public method

public err2Str ( $number )

errNo() public method

public errNo ( )

extractDiagnosticCode() public method

public extractDiagnosticCode ( $message )

getAttributes() public method

public getAttributes ( $entry )

getConnection() public method

public getConnection ( )

getConnectionString() protected method

Generates an LDAP connection string for each host given.
protected getConnectionString ( string | array $hosts = [], string $protocol, string $port ) : string
$hosts string | array
$protocol string
$port string
return string

getDiagnosticMessage() public method

getEntries() public method

public getEntries ( $searchResults )

getExtendedError() public method

public getExtendedError ( )

getExtendedErrorCode() public method

getExtendedErrorHex() public method

public getExtendedErrorHex ( )

getFirstEntry() public method

public getFirstEntry ( $searchResults )

getLastError() public method

public getLastError ( )

getNextEntry() public method

public getNextEntry ( $entry )

getProtocol() public method

Returns the LDAP protocol to utilize for the current connection.
public getProtocol ( ) : string
return string

getValuesLen() public method

public getValuesLen ( $entry, $attribute )

isBound() public method

public isBound ( )

isUsingSSL() public method

public isUsingSSL ( )

isUsingTLS() public method

public isUsingTLS ( )

listing() public method

public listing ( $dn, $filter, array $attributes )
$attributes array

modAdd() public method

public modAdd ( $dn, array $entry )
$entry array

modDelete() public method

public modDelete ( $dn, array $entry )
$entry array

modReplace() public method

public modReplace ( $dn, array $entry )
$entry array

modify() public method

public modify ( $dn, array $entry )
$entry array

modifyBatch() public method

public modifyBatch ( $dn, array $values )
$values array

read() public method

public read ( $dn, $filter, array $fields )
$fields array

rename() public method

public rename ( $dn, $newRdn, $newParent, $deleteOldRdn = false )

setOption() public method

public setOption ( $option, $value )

setOptions() public method

public setOptions ( array $options = [] )
$options array

setRebindCallback() public method

public setRebindCallback ( callable $callback )
$callback callable

ssl() public method

public ssl ( $enabled = true )

startTLS() public method

public startTLS ( )

tls() public method

public tls ( $enabled = true )

Property Details

$bound protected_oe property

Stores the bool whether or not the current connection is bound.
protected bool $bound
return boolean

$connection protected_oe property

The active LDAP connection.
protected resource $connection
return resource

$useSSL protected_oe property

To use SSL, your server must support LDAP over SSL. http://adldap.sourceforge.net/wiki/doku.php?id=ldap_over_ssl
protected bool $useSSL
return boolean

$useTLS protected_oe property

If you wish to use TLS you should ensure that $useSSL is set to false and vice-versa
protected bool $useTLS
return boolean