ZendLdapDn provides an API for DN manipulation
Creates a DN from an array or a string
Parameters: |
|
---|---|
Return type: | Dn |
Throws : | ExceptionLdapException |
Creates a DN from a string
Parameters: |
|
---|---|
Return type: | Dn |
Throws : | ExceptionLdapException |
Creates a DN from an array
Parameters: |
|
---|---|
Return type: | Dn |
Throws : | ExceptionLdapException |
Gets the RDN of the current DN
Parameters: | string – |
---|---|
Return type: | array |
Throws : | ExceptionLdapException if DN has no RDN (empty array) |
Gets the RDN of the current DN as a string
Parameters: | string – |
---|---|
Return type: | string |
Throws : | ExceptionLdapException if DN has no RDN (empty array) |
Get the parent DN $levelUp levels up the tree
Parameters: | int – |
---|---|
Throws ExceptionLdapException: | |
Return type: | Dn |
Get a DN part
Parameters: |
|
---|---|
Return type: | array |
Throws : | ExceptionLdapException if index is illegal |
Set a DN part
Parameters: |
|
---|---|
Return type: | Dn Provides a fluent interface |
Throws : | ExceptionLdapException if index is illegal |
Remove a DN part
Parameters: |
|
---|---|
Return type: | Dn Provides a fluent interface |
Throws : | ExceptionLdapException if index is illegal |
Append a DN part
Parameters: | array – |
---|---|
Return type: | Dn Provides a fluent interface |
Prepend a DN part
Parameters: | array – |
---|---|
Return type: | Dn Provides a fluent interface |
Insert a DN part
Parameters: |
|
---|---|
Return type: | Dn Provides a fluent interface |
Throws : | ExceptionLdapException if index is illegal |
Assert index is correct and usable
Parameters: | mixed – |
---|---|
Return type: | bool |
Throws : | ExceptionLdapException |
Assert if value is in a correct RDN format
Parameters: | array – |
---|---|
Return type: | bool |
Throws : | ExceptionLdapException |
Return DN as a string
Parameters: | string – |
---|---|
Return type: | string |
Throws : | ExceptionLdapException |
Do a case folding on a RDN
Parameters: |
|
---|---|
Return type: | array |
Do a case folding on a DN ort part of it
Parameters: |
|
---|---|
Return type: | array |
Required by the ArrayAccess implementation
Parameters: | int – |
---|---|
Return type: | bool |
Sets the default case fold
Parameters: | string – |
---|
Sanitizes the case fold
Parameters: |
|
---|---|
Return type: | string |
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 hexpair. Finally all leading and trailing spaces are converted to sequences of 20.
Parameters: | string|array – An array containing the DN values that should be escaped |
---|---|
Return type: | array The array $values, but escaped |
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.
Parameters: |
|
---|---|
Return type: | array |
Throws : | ExceptionLdapException |
@param string $dn The DN to parse
Parameters: |
|
---|---|
Return type: | bool True if the DN was successfully parsed or false if the string is not a valid DN. |
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 elements.
Parameters: |
|
---|---|
Return type: | string |
Throws : | ExceptionLdapException |
Implodes an array in the form delivered by {@link 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”)
)
Parameters: |
|
---|---|
Return type: | string |
Throws : | ExceptionLdapException |