Zend Framework  1.12
Static Public Member Functions | Public Attributes | List of all members
Zend_Ldap_Attribute Class Reference

Static Public Member Functions

static setAttribute (array &$data, $attribName, $value, $append=false)
 Sets a LDAP attribute.
 
static getAttribute (array $data, $attribName, $index=null)
 Gets a LDAP attribute.
 
static attributeHasValue (array &$data, $attribName, $value)
 Checks if the given value(s) exist in the attribute.
 
static removeDuplicatesFromAttribute (array &$data, $attribName)
 Removes duplicate values from a LDAP attribute.
 
static removeFromAttribute (array &$data, $attribName, $value)
 Remove given values from a LDAP attribute.
 
static convertToLdapValue ($value)
 Converts a PHP data type into its LDAP representation.
 
static convertFromLdapValue ($value)
 Converts an LDAP value into its PHP data type.
 
static convertToLdapDateTimeValue ($value, $utc=false)
 Converts a timestamp into its LDAP date/time representation.
 
static convertFromLdapDateTimeValue ($value)
 Converts LDAP date/time representation into a timestamp.
 
static setPassword (array &$data, $password, $hashType=self::PASSWORD_HASH_MD5, $attribName=null)
 Sets a LDAP password.
 
static createPassword ($password, $hashType=self::PASSWORD_HASH_MD5)
 Creates a LDAP password.
 
static setDateTimeAttribute (array &$data, $attribName, $value, $utc=false, $append=false)
 Sets a LDAP date/time attribute.
 
static getDateTimeAttribute (array $data, $attribName, $index=null)
 Gets a LDAP date/time attribute.
 

Public Attributes

const PASSWORD_HASH_MD5 = 'md5'
 
const PASSWORD_HASH_SMD5 = 'smd5'
 
const PASSWORD_HASH_SHA = 'sha'
 
const PASSWORD_HASH_SSHA = 'ssha'
 
const PASSWORD_UNICODEPWD = 'unicodePwd'
 

Member Function Documentation

static attributeHasValue ( array &  $data,
  $attribName,
  $value 
)
static

Checks if the given value(s) exist in the attribute.

Parameters
array$data
string$attribName
mixed | array$value
Returns
boolean
static convertFromLdapDateTimeValue (   $value)
static

Converts LDAP date/time representation into a timestamp.

Parameters
string$value
Returns
integer|null - null if the value cannot be converted.
static convertFromLdapValue (   $value)
static

Converts an LDAP value into its PHP data type.

use Zend_Ldap_Converter instead

Parameters
string$value
Returns
mixed
static convertToLdapDateTimeValue (   $value,
  $utc = false 
)
static

Converts a timestamp into its LDAP date/time representation.

Parameters
integer$value
boolean$utc
Returns
string|null - null if the value cannot be converted.
static convertToLdapValue (   $value)
static

Converts a PHP data type into its LDAP representation.

use Zend_Ldap_Converter instead

Parameters
mixed$value
Returns
string|null - null if the PHP data type cannot be converted.
static createPassword (   $password,
  $hashType = self::PASSWORD_HASH_MD5 
)
static

Creates a LDAP password.

Parameters
string$password
string$hashType
Returns
string
static getAttribute ( array  $data,
  $attribName,
  $index = null 
)
static

Gets a LDAP attribute.

Parameters
array$data
string$attribName
integer$index
Returns
array|mixed
static getDateTimeAttribute ( array  $data,
  $attribName,
  $index = null 
)
static

Gets a LDAP date/time attribute.

Parameters
array$data
string$attribName
integer$index
Returns
array|integer
static removeDuplicatesFromAttribute ( array &  $data,
  $attribName 
)
static

Removes duplicate values from a LDAP attribute.

Parameters
array$data
string$attribName
Returns
void
static removeFromAttribute ( array &  $data,
  $attribName,
  $value 
)
static

Remove given values from a LDAP attribute.

Parameters
array$data
string$attribName
mixed | array$value
Returns
void
static setAttribute ( array &  $data,
  $attribName,
  $value,
  $append = false 
)
static

Sets a LDAP attribute.

Parameters
array$data
string$attribName
scalar | array | Traversable$value
boolean$append
Returns
void
static setDateTimeAttribute ( array &  $data,
  $attribName,
  $value,
  $utc = false,
  $append = false 
)
static

Sets a LDAP date/time attribute.

Parameters
array$data
string$attribName
integer | array | Traversable$value
boolean$utc
boolean$append
Returns
null
static setPassword ( array &  $data,
  $password,
  $hashType = self::PASSWORD_HASH_MD5,
  $attribName = null 
)
static

Sets a LDAP password.

Parameters
array$data
string$password
string$hashType
string | null$attribName
Returns
null

Member Data Documentation

const PASSWORD_HASH_MD5 = 'md5'
const PASSWORD_HASH_SHA = 'sha'
const PASSWORD_HASH_SMD5 = 'smd5'
const PASSWORD_HASH_SSHA = 'ssha'
const PASSWORD_UNICODEPWD = 'unicodePwd'