PHP Class 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.
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
toStorage ( array $data ) : array Rewrite a data array to our internal storage format.

Private Methods

Méthode Description
_checkBound ( ) : null Check if the current connection is bound.

Method Details

__construct() public méthode

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

add() public méthode

Add a new entryobject to a directory.
public add ( Horde_Ldap_Entry $entry ) : Horde_Ldap_Error | true
$entry Horde_Ldap_Entry Horde_Ldap_Entry
Résultat Horde_Ldap_Error | true Horde_Ldap_Error object or true

bind() public méthode

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.
Résultat null

delete() public méthode

Delete an object.
public delete ( string $uid ) : null
$uid string The UID of the object to be deleted.
Résultat null

doSearch() public méthode

Perform the search.
public doSearch ( array $filter, array $attributes = null ) : array
$filter array Filter criteria-
$attributes array Restrict the search result to these attributes.
Résultat array A LDAP serach result.

getEntries() public méthode

Return the entries of a result.
public getEntries ( array $result ) : mixed
$result array The LDAP search result.
Résultat mixed The entries of the result or false.

getEntry() public méthode

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.
Résultat Horde_Ldap_Entry | Horde_Ldap_Error Reference to a Horde_Ldap_Entry object or Horde_Ldap_Error object

modify() public méthode

Modify an ldapentry directly on the server
public modify ( $entry, $data = [] ) : Horde_Ldap_Error | true
Résultat Horde_Ldap_Error | true Horde_Ldap_Error object or true

move() public méthode

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.
Résultat null

parse() public méthode

Partially derived from Net_LDAP_Filter.
public parse ( string $filter ) : array
$filter string The filter string.
Résultat array An array of the parsed filter.

parseSub() public méthode

Parse a LDAP subfilter.
public parseSub ( string $filter ) : array
$filter string The subfilter string.
Résultat array An array of the parsed subfilter.

schema() public méthode

public schema ( )

toStorage() protected méthode

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.
Résultat array The transformed data set.