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
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_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