PHP Класс Turba_Driver_Ldap, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (ASL). If you did did not receive this file, see http://www.horde.org/licenses/apache.
Автор: Chuck Hagenbuch ([email protected])
Автор: Jon Parise ([email protected])
Наследование: extends Turba_Driver
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_ds resource Handle for the current LDAP connection.
$_syntaxCache array Cache _getSyntax() calls.

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

Метод Описание
__construct ( string $name = '', array $params = [] ) : Turba_Driver_Ldap Constructs a new Turba LDAP driver object.
toDriverKeys ( array $hash ) : array Extends parent function to build composed fields needed for the dn based on the contents of $this->map.

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

Метод Описание
_add ( array $attributes, array $blob_fields = [], array $date_fields = [] ) Adds the specified contact to the addressbook.
_buildSearchQuery ( array $criteria ) : string Build a piece of a search query.
_canAdd ( ) : boolean TODO
_checkRequiredAttributes ( array $objectclasses ) : array Returns a list of required attributes.
_connect ( ) Initiate LDAP connection.
_convertParameters ( array $in ) : array Converts Turba connection parameter so Horde_Ldap parameters.
_delete ( string $object_key, string $object_id ) Deletes the specified entry from the LDAP directory.
_emptyAttributeFilter ( $var ) : boolean Remove empty attributes from attributes array.
_encodeAttributes ( array &$attributes ) Format and encode attributes including postal addresses, character set encoding, etc.
_getResults ( array $fields, resource $res ) : array Get some results from a result identifier and clean them up.
_getSyntax ( string $att ) : string Returns the syntax of an attribute, if necessary recursively.
_isPostalAddress ( string $attribute ) : boolean Checks if an attribute refers to a Postal Address.
_isString ( string $attribute ) : boolean Checks if an attribute refers to a string.
_makeKey ( array $attributes ) : string Build a DN based on a set of attributes and what attributes make a DN for the current source.
_makeRDN ( array $attributes ) : string Build a RDN based on a set of attributes and what attributes make a RDN for the current source.
_makeRDNhelper ( array $attributes, array $dn ) : string Helper function for _makeRDN().
_read ( string $key, mixed $ids, string $owner, array $fields, array $blobFields = [], array $dateFields = [] ) : array Reads the LDAP directory for a given element and returns the results.
_save ( Turba_Object $object ) : string Modifies the specified entry in the LDAP directory.
_search ( array $criteria, array $fields, array $blobFields = [], $count_only = false ) : array Searches the LDAP directory with the given criteria and returns a filtered list of results. If no criteria are specified, all records are returned.

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

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

Constructs a new Turba LDAP driver object.
public __construct ( string $name = '', array $params = [] ) : Turba_Driver_Ldap
$name string The source name
$params array Hash containing additional configuration parameters.
Результат Turba_Driver_Ldap

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

Adds the specified contact to the addressbook.
protected _add ( array $attributes, array $blob_fields = [], array $date_fields = [] )
$attributes array The attribute values of the contact.
$blob_fields array Fields that represent binary data.
$date_fields array Fields that represent dates. @since 4.2.0

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

Build a piece of a search query.
protected _buildSearchQuery ( array $criteria ) : string
$criteria array The array of criteria.
Результат string An LDAP query fragment.

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

TODO
protected _canAdd ( ) : boolean
Результат boolean TODO

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

Returns a list of required attributes.
protected _checkRequiredAttributes ( array $objectclasses ) : array
$objectclasses array List of objectclasses that should be checked for required attributes.
Результат array List of attribute names of the specified objectclasses that have been configured as being required.

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

Not done in __construct(), only when a read or write action is necessary.
protected _connect ( )

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

Converts Turba connection parameter so Horde_Ldap parameters.
protected _convertParameters ( array $in ) : array
$in array Turba parameters.
Результат array Horde_Ldap parameters.

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

Deletes the specified entry from the LDAP directory.
protected _delete ( string $object_key, string $object_id )
$object_key string
$object_id string

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

Remove empty attributes from attributes array.
protected _emptyAttributeFilter ( $var ) : boolean
Результат boolean Boolean used by array_filter.

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

Format and encode attributes including postal addresses, character set encoding, etc.
protected _encodeAttributes ( array &$attributes )
$attributes array The attributes array.

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

Get some results from a result identifier and clean them up.
protected _getResults ( array $fields, resource $res ) : array
$fields array List of fields to return.
$res resource Result identifier.
Результат array Hash containing the results.

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

Returns the syntax of an attribute, if necessary recursively.
protected _getSyntax ( string $att ) : string
$att string Attribute name.
Результат string Attribute syntax.

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

Checks if an attribute refers to a Postal Address.
protected _isPostalAddress ( string $attribute ) : boolean
$attribute string An attribute name.
Результат boolean True if the specified attribute refers to a Postal Address.

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

Checks if an attribute refers to a string.
protected _isString ( string $attribute ) : boolean
$attribute string An attribute name.
Результат boolean True if the specified attribute refers to a string.

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

Build a DN based on a set of attributes and what attributes make a DN for the current source.
protected _makeKey ( array $attributes ) : string
$attributes array The attributes (in driver keys) of the object being added.
Результат string The DN for the new object.

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

Build a RDN based on a set of attributes and what attributes make a RDN for the current source.
protected _makeRDN ( array $attributes ) : string
$attributes array The attributes (in driver keys) of the object being added.
Результат string The RDN for the new object.

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

Recursively builds the (possibly nested) attribute-value array to build a DN. Nested arrays will be joined with the '+' character, see Horde_Ldap::quoteDN().
protected _makeRDNhelper ( array $attributes, array $dn ) : string
$attributes array The attributes (in driver keys) of the object being added.
$dn array The array describing how the DN should be built.
Результат string The array to be passed to Horde_Ldap::quoteDN().

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

Reads the LDAP directory for a given element and returns the results.
protected _read ( string $key, mixed $ids, string $owner, array $fields, array $blobFields = [], array $dateFields = [] ) : array
$key string The primary key field to use.
$ids mixed The ids of the contacts to load.
$owner string Only return contacts owned by this user.
$fields array List of fields to return.
$blobFields array Array of fields containing binary data.
$dateFields array Array of fields containing date data. @since 4.2.0
Результат array Hash containing the search results.

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

Modifies the specified entry in the LDAP directory.
protected _save ( Turba_Object $object ) : string
$object Turba_Object The object we wish to save.
Результат string The object id, possibly updated.

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

Extends parent function to build composed fields needed for the dn based on the contents of $this->map.
public toDriverKeys ( array $hash ) : array
$hash array Hash using Turba keys.
Результат array Translated version of $hash.

Описание свойств

$_ds защищенное свойство

Handle for the current LDAP connection.
protected resource $_ds
Результат resource

$_syntaxCache защищенное свойство

Cache _getSyntax() calls.
protected array $_syntaxCache
Результат array