Ldap/Attribute.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Ldap
- Version
- $Id$
Package: Zend_LdapZend_Ldap_Attribute is a collection of LDAP attribute related functions.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Methods



attributeHasValue(array $data, string $attribName, mixed | array $value) : booleanstaticChecks if the given value(s) exist in the attribute
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $attribName | string | |
|---|
| $value | mixed | array | |
|---|
Returns 


convertFromLdapDateTimeValue(string $value) : integer | nullstaticConverts LDAP date/time representation into a timestamp
Parameters| Name | Type | Description |
|---|
| $value | string | |
|---|
Returns| Type | Description |
|---|
| integer | null | - null if the value cannot be converted. |



convertFromLdapValue(string $value) : mixedstaticConverts an LDAP value into its PHP data type
Parameters| Name | Type | Description |
|---|
| $value | string | |
|---|
ReturnsDetails- Deprected
- use Zend_Ldap_Converter instead



convertToLdapDateTimeValue(integer $value, boolean $utc = false) : string | nullstaticConverts a timestamp into its LDAP date/time representation
Parameters| Name | Type | Description |
|---|
| $value | integer | |
|---|
| $utc | boolean | |
|---|
Returns| Type | Description |
|---|
| string | null | - null if the value cannot be converted. |



convertToLdapValue(mixed $value) : string | nullstaticConverts a PHP data type into its LDAP representation
Parameters| Name | Type | Description |
|---|
| $value | mixed | |
|---|
Returns| Type | Description |
|---|
| string | null | - null if the PHP data type cannot be converted. |
Details- Deprected
- use Zend_Ldap_Converter instead



createPassword(string $password, string $hashType = self::PASSWORD_HASH_MD5) : stringstaticCreates a LDAP password.
Parameters| Name | Type | Description |
|---|
| $password | string | |
|---|
| $hashType | string | |
|---|
Returns 


getAttribute(array $data, string $attribName, integer $index = null) : array | mixedstaticGets a LDAP attribute.
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $attribName | string | |
|---|
| $index | integer | |
|---|
Returns| Type | Description |
|---|
| array | mixed | |



getDateTimeAttribute(array $data, string $attribName, integer $index = null) : array | integerstaticGets a LDAP date/time attribute.
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $attribName | string | |
|---|
| $index | integer | |
|---|
Returns| Type | Description |
|---|
| array | integer | |



removeDuplicatesFromAttribute(array $data, string $attribName) : voidstaticRemoves duplicate values from a LDAP attribute
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $attribName | string | |
|---|



removeFromAttribute(array $data, string $attribName, mixed | array $value) : voidstaticRemove given values from a LDAP attribute
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $attribName | string | |
|---|
| $value | mixed | array | |
|---|



setAttribute(array $data, string $attribName, scalar | array | \Traversable $value, boolean $append = false) : voidstaticSets a LDAP attribute.
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $attribName | string | |
|---|
| $value | scalar | array | \Traversable | |
|---|
| $append | boolean | |
|---|



setDateTimeAttribute(array $data, string $attribName, integer | array | \Traversable $value, boolean $utc = false, boolean $append = false) : nullstaticSets a LDAP date/time attribute.
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $attribName | string | |
|---|
| $value | integer | array | \Traversable | |
|---|
| $utc | boolean | |
|---|
| $append | boolean | |
|---|
Returns 


setPassword(array $data, string $password, string $hashType = self::PASSWORD_HASH_MD5, string | null $attribName = null) : nullstaticSets a LDAP password.
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $password | string | |
|---|
| $hashType | string | |
|---|
| $attribName | string | null | |
|---|
Returns