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.
SEARCH_SCOPE_SUB = '1'
SEARCH_SCOPE_ONE = '2'
SEARCH_SCOPE_BASE = '3'
ACCTNAME_FORM_DN = '1'
ACCTNAME_FORM_USERNAME = '2'
ACCTNAME_FORM_BACKSLASH = '3'
ACCTNAME_FORM_PRINCIPAL = '4'
boolean|null|string $_boundUser = 'false'
FALSE if no user is bound to the LDAP resource NULL if there has been an anonymous bind username of the currently bound user
string $_connectString = ''
String used with ldap_connect for error handling purposes.
array $_options = 'null'
The options used in connecting, binding, etc.
resource $_resource = 'null'
The raw LDAP extension resource.
Zend_Ldap_Node $_rootDse = 'null'
Caches the RootDSE
Zend_Ldap_Node $_schema = 'null'
Caches the schema
__construct(
array|Zend_Config $options
=
array
)
:
void
Constructor.
__destruct(
)
:
void
Destructor.
_createCollection(
Zend_Ldap_Collection_Iterator_Default $iterator, string|null $collectionClass
)
:
Zend_Ldap_Collection
Extension point for collection creation
_getAccount(
$acctname, array $attrs
=
null
)
:
array
_getAccountCanonicalForm(
)
:
integer
_getAccountDn(
string $acctname
)
:
string
_getAccountDomainName(
)
:
string
_getAccountDomainNameShort(
)
:
string
_getAccountFilter(
$acctname
)
:
string
_getAccountFilterFormat(
)
:
string
_getAllowEmptyPassword(
)
:
boolean
_getBindRequiresDn(
)
:
boolean
_getChildrenDns(
string|Zend_Ldap_Dn $parentDn
)
:
array
Retrieve the immediate children DNs of the given $parentDn
This method is used in recursive methods like {@see delete()} or {@see copy()}
_getHost(
)
:
string
_getOptReferrals(
)
:
boolean
_getPassword(
)
:
string
_getPort(
)
:
int
_getTryUsernameSplit(
)
:
boolean
_getUseSsl(
)
:
boolean
_getUseStartTls(
)
:
boolean
_getUsername(
)
:
string
_isPossibleAuthority(
string $dname
)
:
boolean
_splitName(
string $name, string $dname, string $aname
)
:
void
add(
string|Zend_Ldap_Dn $dn, array $entry
)
:
Zend_Ldap
Add new information to the LDAP repository
bind(
string $username
=
null, string $password
=
null
)
:
Zend_Ldap
connect(
string $host
=
null, int $port
=
null, boolean $useSsl
=
null, boolean $useStartTls
=
null
)
:
Zend_Ldap
To connect using SSL it seems the client tries to verify the server certificate by default. One way to disable this behavior is to set 'TLS_REQCERT never' in OpenLDAP's ldap.conf and restarting Apache. Or, if you really care about the server's cert you can put a cert on the web server.
copy(
string|Zend_Ldap_Dn $from, string|Zend_Ldap_Dn $to, boolean $recursively
=
false
)
:
Zend_Ldap
Copies a LDAP entry from one DN to another DN.
copyToSubtree(
string|Zend_Ldap_Dn $from, string|Zend_Ldap_Dn $to, boolean $recursively
=
false
)
:
Zend_Ldap
Copies a LDAP entry from one DN to another subtree.
count(
string|Zend_Ldap_Filter_Abstract $filter, string|Zend_Ldap_Dn|null $basedn
=
null, integer $scope
=
self
)
:
integer
Count items found by given filter.
countChildren(
string|Zend_Ldap_Dn $dn
)
:
integer
Count children for a given DN.
delete(
string|Zend_Ldap_Dn $dn, boolean $recursively
=
false
)
:
Zend_Ldap
Delete an LDAP entry
disconnect(
)
:
Zend_Ldap
exists(
string|Zend_Ldap_Dn $dn
)
:
boolean
Check if a given DN exists.
explodeDn(
string $dn, array $keys
=
null, array $vals
=
null
)
:
boolean
filterEscape(
string $str
)
:
string
getBaseDn(
)
:
string
Gets the base DN under which objects of interest are located
getBaseNode(
)
:
Zend_Ldap_Node
Returns the base node as a Zend_Ldap_Node
getBoundUser(
)
:
false|null|string
Get the currently bound user
FALSE if no user is bound to the LDAP resource NULL if there has been an anonymous bind username of the currently bound user
getCanonicalAccountName(
string $acctname, $form
=
0
)
:
string
getEntry(
string|Zend_Ldap_Dn $dn, array $attributes
=
array, boolean $throwOnNotFound
=
false
)
:
array
Get LDAP entry by DN
getLastError(
int $errorCode
=
null, array $errorMessages
=
null
)
:
string
Return the LDAP error message of the last LDAP command
getLastErrorCode(
)
:
int
Return the LDAP error number of the last LDAP command
getNode(
string|Zend_Ldap_Dn $dn
)
:
Zend_Ldap_Node|null
Returns the specified DN as a Zend_Ldap_Node
getOptions(
)
:
array
getResource(
)
:
resource
getRootDse(
)
:
Zend_Ldap_Node_RootDse
Returns the RootDSE
getSchema(
)
:
Zend_Ldap_Node_Schema
Returns the schema
move(
string|Zend_Ldap_Dn $from, string|Zend_Ldap_Dn $to, boolean $recursively
=
false, boolean $alwaysEmulate
=
false
)
:
Zend_Ldap
Moves a LDAP entry from one DN to another DN.
This is an alias for {@link rename()}
moveToSubtree(
string|Zend_Ldap_Dn $from, string|Zend_Ldap_Dn $to, boolean $recursively
=
false, boolean $alwaysEmulate
=
false
)
:
Zend_Ldap
Moves a LDAP entry from one DN to another subtree.
prepareLdapEntryArray(
array $entry
)
:
void
Prepares an ldap data entry array for insert/update operation
rename(
string|Zend_Ldap_Dn $from, string|Zend_Ldap_Dn $to, boolean $recursively
=
false, boolean $alwaysEmulate
=
false
)
:
Zend_Ldap
Renames a LDAP entry from one DN to another DN.
This method implicitely moves the entry to another location within the tree.
save(
string|Zend_Ldap_Dn $dn, array $entry
)
:
Zend_Ldap
Save entry to LDAP registry.
Internally decides if entry will be updated to added by calling {@link exists()}.
search(
string|Zend_Ldap_Filter_Abstract|array $filter, string|Zend_Ldap_Dn|null $basedn
=
null, integer $scope
=
self, array $attributes
=
array, string|null $sort
=
null, string|null $collectionClass
=
null, integer $sizelimit
=
0, integer $timelimit
=
0
)
:
Zend_Ldap_Collection
A global LDAP search routine for finding information.
Options can be either passed as single parameters according to the method signature or as an array with one or more of the following keys - filter - baseDn - scope - attributes - sort - collectionClass - sizelimit - timelimit
searchEntries(
string|Zend_Ldap_Filter_Abstract|array $filter, string|Zend_Ldap_Dn|null $basedn
=
null, integer $scope
=
self, array $attributes
=
array, string|null $sort
=
null, boolean $reverseSort
=
false, integer $sizelimit
=
0, integer $timelimit
=
0
)
:
array
Search LDAP registry for entries matching filter and optional attributes
Options can be either passed as single parameters according to the method signature or as an array with one or more of the following keys - filter - baseDn - scope - attributes - sort - reverseSort - sizelimit - timelimit
setOptions(
array|Zend_Config $options
)
:
Zend_Ldap
Sets the options used in connecting, binding, etc.
Valid option keys: host port useSsl username password bindRequiresDn baseDn accountCanonicalForm accountDomainName accountDomainNameShort accountFilterFormat allowEmptyPassword useStartTls optRefferals tryUsernameSplit
update(
string|Zend_Ldap_Dn $dn, array $entry
)
:
Zend_Ldap
Update LDAP registry