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.
Zend_Ldap_Dn provides an API for DN manipulation
ATTR_CASEFOLD_NONE = 'none'
Details ATTR_CASEFOLD_UPPER = 'upper'
Details ATTR_CASEFOLD_LOWER = 'lower'
Detailsstring $_caseFold = ''The case fold used for this instance
Detailsstring $_defaultCaseFold = 'self'The default case fold to use
Detailsarray $_dn = ''The DN data
Details__construct(
array $dn, string|null $caseFold
)
:
Constructor
Details__toString(
)
:
stringCast to string representation {@see toString()}
Details_assertIndex(
mixed $index
)
:
booleanAssert index is correct and usable
Details_assertRdn(
array $value
)
:
booleanAssert if value is in a correct RDN format
Details_caseFoldDn(
array $dn, string $caseFold
)
:
arrayDo a case folding on a DN ort part of it
Details_caseFoldRdn(
array $part, string $caseFold
)
:
arrayDo a case folding on a RDN
Details_sanitizeCaseFold(
string $caseFold, $default
)
:
stringSanitizes the case fold
Detailsappend(
array $value
)
:
Zend_Ldap_DnAppend a DN part
DetailscheckDn(
string $dn, array $keys
=
null, array $vals
=
null, string $caseFold
=
self
)
:
boolean
DetailsescapeValue(
string|array $values
=
array
)
:
arrayEscapes 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.
DetailsexplodeDn(
string $dn, array $keys
=
null, array $vals
=
null, string $caseFold
=
self
)
:
arrayCreates 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.
Detailsfactory(
string|array $dn, string|null $caseFold
=
null
)
:
Zend_Ldap_DnCreates a DN from an array or a string
DetailsfromArray(
array $dn, string|null $caseFold
=
null
)
:
Zend_Ldap_DnCreates a DN from an array
DetailsfromString(
string $dn, string|null $caseFold
=
null
)
:
Zend_Ldap_DnCreates a DN from a string
Detailsget(
int $index, int $length
=
1, string $caseFold
=
null
)
:
arrayGet a DN part
DetailsgetParentDn(
int $levelUp
=
1
)
:
Zend_Ldap_DnGet the parent DN $levelUp levels up the tree
DetailsgetRdn(
string $caseFold
=
null
)
:
arrayGets the RDN of the current DN
DetailsgetRdnString(
string $caseFold
=
null
)
:
stringGets the RDN of the current DN as a string
DetailsimplodeDn(
array $dnArray, string $caseFold
=
null, string $separator
=
,
)
:
stringImplodes 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") )
DetailsimplodeRdn(
$part, string $caseFold
=
null
)
:
stringReturns 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.
Detailsinsert(
int $index, array $value
)
:
Zend_Ldap_DnInsert a DN part
DetailsisChildOf(
string|Zend_Ldap_Dn $childDn, string|Zend_Ldap_Dn $parentDn
)
:
booleanChecks if given $childDn is beneath $parentDn subtree.
DetailsoffsetExists(
int $offset
)
:
booleanRequired by the ArrayAccess implementation
DetailsoffsetGet(
int $offset
)
:
arrayProxy to {@see get()} Required by the ArrayAccess implementation
DetailsoffsetSet(
int $offset, array $value
)
:
Proxy to {@see set()} Required by the ArrayAccess implementation
DetailsoffsetUnset(
int $offset
)
:
Proxy to {@see remove()} Required by the ArrayAccess implementation
Detailsprepend(
array $value
)
:
Zend_Ldap_DnPrepend a DN part
Detailsremove(
int $index, int $length
=
1
)
:
Zend_Ldap_DnRemove a DN part
Detailsset(
int $index, array $value
)
:
Zend_Ldap_DnSet a DN part
DetailssetCaseFold(
string|null $caseFold
)
:
Sets the case fold
DetailssetDefaultCaseFold(
string $caseFold
)
:
Sets the default case fold
DetailstoArray(
string $caseFold
=
null
)
:
arrayReturn DN as an array
DetailstoString(
string $caseFold
=
null
)
:
stringReturn DN as a string
DetailsunescapeValue(
string|array $values
=
array
)
:
arrayUndoes the conversion done by {@link escapeValue()}.
Any escape sequence starting with a baskslash - hexpair or special character - will be transformed back to the corresponding character.
Details