PHP Класс Horde_Kolab_Server_Connection_Mock_Ldap, horde

Copyright 2008-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Gunnar Wrobel ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( array $params, array $data ) Constructor.
add ( Horde_Ldap_Entry $entry ) : Horde_Ldap_Error | true Add a new entryobject to a directory.
bind ( string $dn = '', string $pw = '' ) : null Binds the LDAP connection with a specific user and pass.
delete ( string $uid ) : null Delete an object.
doSearch ( array $filter, array $attributes = null ) : array Perform the search.
getEntries ( array $result ) : mixed Return the entries of a result.
getEntry ( string $dn, array $attr = [] ) : Horde_Ldap_Entry | Horde_Ldap_Error Get a specific entry based on the DN
modify ( $entry, $data = [] ) : Horde_Ldap_Error | true Modify an ldapentry directly on the server
move ( string $uid, string $new ) : null Rename an object.
parse ( string $filter ) : array Parse LDAP filter.
parseSub ( string $filter ) : array Parse a LDAP subfilter.
schema ( )
search ( string $base = null, string $filter = null, string $params = [] ) : array Search for object data.

Защищенные методы

Метод Описание
toStorage ( array $data ) : array Rewrite a data array to our internal storage format.

Приватные методы

Метод Описание
_checkBound ( ) : null Check if the current connection is bound.

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

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

Constructor.
public __construct ( array $params, array $data )
$params array Connection parameters.
$data array Mockup LDAP data.

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

Add a new entryobject to a directory.
public add ( Horde_Ldap_Entry $entry ) : Horde_Ldap_Error | true
$entry Horde_Ldap_Entry Horde_Ldap_Entry
Результат Horde_Ldap_Error | true Horde_Ldap_Error object or true

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

Binds the LDAP connection with a specific user and pass.
public bind ( string $dn = '', string $pw = '' ) : null
$dn string DN to bind with
$pw string Password associated to this DN.
Результат null

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

Delete an object.
public delete ( string $uid ) : null
$uid string The UID of the object to be deleted.
Результат null

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

Perform the search.
public doSearch ( array $filter, array $attributes = null ) : array
$filter array Filter criteria-
$attributes array Restrict the search result to these attributes.
Результат array A LDAP serach result.

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

Return the entries of a result.
public getEntries ( array $result ) : mixed
$result array The LDAP search result.
Результат mixed The entries of the result or false.

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

Get a specific entry based on the DN
public getEntry ( string $dn, array $attr = [] ) : Horde_Ldap_Entry | Horde_Ldap_Error
$dn string DN of the entry that should be fetched
$attr array Array of Attributes to select. If ommitted, all attributes are fetched.
Результат Horde_Ldap_Entry | Horde_Ldap_Error Reference to a Horde_Ldap_Entry object or Horde_Ldap_Error object

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

Modify an ldapentry directly on the server
public modify ( $entry, $data = [] ) : Horde_Ldap_Error | true
Результат Horde_Ldap_Error | true Horde_Ldap_Error object or true

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

Rename an object.
public move ( string $uid, string $new ) : null
$uid string The UID of the object to be renamed.
$new string The new UID of the object.
Результат null

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

Partially derived from Net_LDAP_Filter.
public parse ( string $filter ) : array
$filter string The filter string.
Результат array An array of the parsed filter.

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

Parse a LDAP subfilter.
public parseSub ( string $filter ) : array
$filter string The subfilter string.
Результат array An array of the parsed subfilter.

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

public schema ( )

toStorage() защищенный Метод

Rewrite a data array to our internal storage format.
protected toStorage ( array $data ) : array
$data array The attributes of the object to be added/replaced.
Результат array The transformed data set.