Zend Framework
1.12
|
Public Member Functions | |
getRdn ($caseFold=null) | |
Gets the RDN of the current DN. | |
getRdnString ($caseFold=null) | |
Gets the RDN of the current DN as a string. | |
getParentDn ($levelUp=1) | |
Get the parent DN $levelUp levels up the tree. | |
get ($index, $length=1, $caseFold=null) | |
Get a DN part. | |
set ($index, array $value) | |
Set a DN part. | |
remove ($index, $length=1) | |
Remove a DN part. | |
append (array $value) | |
Append a DN part. | |
prepend (array $value) | |
Prepend a DN part. | |
insert ($index, array $value) | |
Insert a DN part. | |
setCaseFold ($caseFold) | |
Sets the case fold. | |
toString ($caseFold=null) | |
Return DN as a string. | |
toArray ($caseFold=null) | |
Return DN as an array. | |
__toString () | |
Cast to string representation {. | |
offsetExists ($offset) | |
Required by the ArrayAccess implementation. | |
offsetGet ($offset) | |
Proxy to {. | |
offsetSet ($offset, $value) | |
Proxy to {. | |
offsetUnset ($offset) | |
Proxy to {. | |
Static Public Member Functions | |
static | factory ($dn, $caseFold=null) |
Creates a DN from an array or a string. | |
static | fromString ($dn, $caseFold=null) |
Creates a DN from a string. | |
static | fromArray (array $dn, $caseFold=null) |
Creates a DN from an array. | |
static | setDefaultCaseFold ($caseFold) |
Sets the default case fold. | |
static | escapeValue ($values=array()) |
Escapes a DN value according to RFC 2253. | |
static | unescapeValue ($values=array()) |
Undoes the conversion done by escapeValue(). | |
static | explodeDn ($dn, array &$keys=null, array &$vals=null, $caseFold=self::ATTR_CASEFOLD_NONE) |
Creates an array containing all parts of the given DN. | |
static | checkDn ($dn, array &$keys=null, array &$vals=null, $caseFold=self::ATTR_CASEFOLD_NONE) |
static | implodeRdn (array $part, $caseFold=null) |
Returns a DN part in the form $attribute = $value. | |
static | implodeDn (array $dnArray, $caseFold=null, $separator= ',') |
Implodes an array in the form delivered by explodeDn() to a DN string. | |
static | isChildOf ($childDn, $parentDn) |
Checks if given $childDn is beneath $parentDn subtree. | |
Public Attributes | |
const | ATTR_CASEFOLD_NONE = 'none' |
const | ATTR_CASEFOLD_UPPER = 'upper' |
const | ATTR_CASEFOLD_LOWER = 'lower' |
Protected Member Functions | |
__construct (array $dn, $caseFold) | |
Constructor. | |
_assertIndex ($index) | |
Assert index is correct and usable. | |
Static Protected Member Functions | |
static | _assertRdn (array $value) |
Assert if value is in a correct RDN format. | |
static | _caseFoldRdn (array $part, $caseFold) |
Do a case folding on a RDN. | |
static | _caseFoldDn (array $dn, $caseFold) |
Do a case folding on a DN ort part of it. | |
static | _sanitizeCaseFold ($caseFold, $default) |
Sanitizes the case fold. | |
Protected Attributes | |
$_caseFold | |
$_dn | |
Static Protected Attributes | |
static | $_defaultCaseFold = self::ATTR_CASEFOLD_NONE |
|
protected |
Constructor.
array | $dn | |
string | null | $caseFold |
__toString | ( | ) |
|
protected |
Assert index is correct and usable.
mixed | $index |
Zend_Ldap_Exception |
|
staticprotected |
Assert if value is in a correct RDN format.
array | $value |
Zend_Ldap_Exception |
|
staticprotected |
Do a case folding on a DN ort part of it.
array | $dn | |
string | $caseFold |
|
staticprotected |
Do a case folding on a RDN.
array | $part | |
string | $caseFold |
|
staticprotected |
Sanitizes the case fold.
string | $caseFold |
append | ( | array | $value | ) |
|
static |
string | $dn | The DN to parse |
array | $keys | An optional array to receive DN keys (e.g. CN, OU, DC, ...) |
array | $vals | An optional array to receive DN values |
string | $caseFold |
|
static |
Escapes a DN value according to RFC 2253.
Escapes the given VALUES according to RFC 2253 so that they can be safely used in LDAP DNs. The characters ",", "+", """, "", "<", ">", ";", "#", " = " with a special meaning in RFC 2252 are preceeded by ba backslash. Control characters with an ASCII code < 32 are represented as . Finally all leading and trailing spaces are converted to sequences of \20.
|
static |
Creates an array containing all parts of the given DN.
Array will be of type array( array("cn" => "name1", "uid" => "user"), array("cn" => "name2"), array("dc" => "example"), array("dc" => "org") ) for a DN of cn=name1+uid=user,cn=name2,dc=example,dc=org.
string | $dn | |
array | $keys | An optional array to receive DN keys (e.g. CN, OU, DC, ...) |
array | $vals | An optional array to receive DN values |
string | $caseFold |
Zend_Ldap_Exception |
|
static |
Creates a DN from an array or a string.
string | array | $dn | |
string | null | $caseFold |
Zend_Ldap_Exception |
|
static |
Creates a DN from an array.
array | $dn | |
string | null | $caseFold |
Zend_Ldap_Exception |
|
static |
Creates a DN from a string.
string | $dn | |
string | null | $caseFold |
Zend_Ldap_Exception |
get | ( | $index, | |
$length = 1 , |
|||
$caseFold = null |
|||
) |
Get a DN part.
int | $index | |
int | $length | |
string | $caseFold |
Zend_Ldap_Exception | if index is illegal |
getParentDn | ( | $levelUp = 1 | ) |
getRdn | ( | $caseFold = null | ) |
Gets the RDN of the current DN.
string | $caseFold |
Zend_Ldap_Exception | if DN has no RDN (empty array) |
getRdnString | ( | $caseFold = null | ) |
Gets the RDN of the current DN as a string.
string | $caseFold |
Zend_Ldap_Exception | if DN has no RDN (empty array) |
|
static |
Implodes an array in the form delivered by explodeDn() to a DN string.
$dnArray must be of type array( array("cn" => "name1", "uid" => "user"), array("cn" => "name2"), array("dc" => "example"), array("dc" => "org") )
array | $dnArray | |
string | $caseFold | |
string | $separator |
Zend_Ldap_Exception |
|
static |
Returns a DN part in the form $attribute = $value.
This method supports the creation of multi-valued RDNs $part must contain an even number of elemets.
array | $attribute | |
string | $caseFold |
Zend_Ldap_Exception |
insert | ( | $index, | |
array | $value | ||
) |
Insert a DN part.
int | $index | |
array | $value |
Zend_Ldap_Exception | if index is illegal |
|
static |
Checks if given $childDn is beneath $parentDn subtree.
string | Zend_Ldap_Dn | $childDn | |
string | Zend_Ldap_Dn | $parentDn |
offsetExists | ( | $offset | ) |
Required by the ArrayAccess implementation.
int | $offset |
offsetGet | ( | $offset | ) |
Proxy to {.
int | $offset |
offsetSet | ( | $offset, | |
$value | |||
) |
Proxy to {.
int | $offset | |
array | $value |
offsetUnset | ( | $offset | ) |
prepend | ( | array | $value | ) |
remove | ( | $index, | |
$length = 1 |
|||
) |
Remove a DN part.
int | $index | |
int | $length |
Zend_Ldap_Exception | if index is illegal |
set | ( | $index, | |
array | $value | ||
) |
Set a DN part.
int | $index | |
array | $value |
Zend_Ldap_Exception | if index is illegal |
setCaseFold | ( | $caseFold | ) |
Sets the case fold.
string | null | $caseFold |
|
static |
Sets the default case fold.
string | $caseFold |
toArray | ( | $caseFold = null | ) |
Return DN as an array.
string | $caseFold |
toString | ( | $caseFold = null | ) |
|
static |
Undoes the conversion done by escapeValue().
Any escape sequence starting with a baskslash - hexpair or special character - will be transformed back to the corresponding character.
|
protected |
|
staticprotected |
|
protected |
const ATTR_CASEFOLD_LOWER = 'lower' |
const ATTR_CASEFOLD_NONE = 'none' |
const ATTR_CASEFOLD_UPPER = 'upper' |