PHP Class BookStack\Services\Ldap

Allows the standard LDAP functions to be mocked for testing.
Afficher le fichier Open project: ssddanbrown/bookstack

Méthodes publiques

Méthode Description
bind ( resource $ldapConnection, string $bindRdn = null, string $bindPassword = null ) : boolean Bind to LDAP directory.
connect ( string $hostName, integer $port ) : resource Connect to a LDAP server.
getEntries ( resource $ldapConnection, resource $ldapSearchResult ) : array Get entries from an ldap search result.
search ( resource $ldapConnection, string $baseDn, string $filter, array $attributes = null ) : resource Search LDAP tree using the provided filter.
searchAndGetEntries ( resource $ldapConnection, string $baseDn, string $filter, array $attributes = null ) : resource Search and get entries immediately.
setOption ( resource $ldapConnection, integer $option, mixed $value ) : boolean Set the value of a LDAP option for the given connection.
setVersion ( $ldapConnection, $version ) : boolean Set the version number for the given ldap connection.

Method Details

bind() public méthode

Bind to LDAP directory.
public bind ( resource $ldapConnection, string $bindRdn = null, string $bindPassword = null ) : boolean
$ldapConnection resource
$bindRdn string
$bindPassword string
Résultat boolean

connect() public méthode

Connect to a LDAP server.
public connect ( string $hostName, integer $port ) : resource
$hostName string
$port integer
Résultat resource

getEntries() public méthode

Get entries from an ldap search result.
public getEntries ( resource $ldapConnection, resource $ldapSearchResult ) : array
$ldapConnection resource
$ldapSearchResult resource
Résultat array

searchAndGetEntries() public méthode

Search and get entries immediately.
public searchAndGetEntries ( resource $ldapConnection, string $baseDn, string $filter, array $attributes = null ) : resource
$ldapConnection resource
$baseDn string
$filter string
$attributes array
Résultat resource

setOption() public méthode

Set the value of a LDAP option for the given connection.
public setOption ( resource $ldapConnection, integer $option, mixed $value ) : boolean
$ldapConnection resource
$option integer
$value mixed
Résultat boolean

setVersion() public méthode

Set the version number for the given ldap connection.
public setVersion ( $ldapConnection, $version ) : boolean
$ldapConnection
$version
Résultat boolean