212. Class

212.1. Zend\Ldap\Collection\DefaultIterator

ZendLdapCollectionDefaultIterator is the default collection iterator implementation using ext/ldap

212.1.1. Methods

212.1.1.1. __construct

__construct()

Constructor.

Parameters:
  • ZendLdapLdap
  • resource
Throws ZendLdapExceptionLdapException:
 

if no entries was found.

Return type:

DefaultIterator

212.1.1.2. __destruct

__destruct()

212.1.1.3. close

close()

Closes the current result set

Return type:bool

212.1.1.4. getLDAP

getLDAP()

Gets the current LDAP connection.

Return type:ZendLdapLdap

212.1.1.5. setAttributeNameTreatment

setAttributeNameTreatment()

Sets the attribute name treatment.

Can either be one of the following constants - ZendLdapCollectionDefaultIterator::ATTRIBUTE_TO_LOWER - ZendLdapCollectionDefaultIterator::ATTRIBUTE_TO_UPPER - ZendLdapCollectionDefaultIterator::ATTRIBUTE_NATIVE or a valid callback accepting the attribute’s name as it’s only argument and returning the new attribute’s name.

Parameters:integer|callable
Return type:DefaultIterator Provides a fluent interface

212.1.1.6. getAttributeNameTreatment

getAttributeNameTreatment()

Returns the currently set attribute name treatment

Return type:integer|callable

212.1.1.7. count

count()

Returns the number of items in current result Implements Countable

Return type:int

212.1.1.8. current

current()

Return the current result item Implements Iterator

Return type:array|null
Throws :ZendLdapExceptionLdapException

212.1.1.9. key

key()

Return the result item key Implements Iterator

Return type:string|null

212.1.1.11. rewind

rewind()

Rewind the Iterator to the first result item Implements Iterator

212.1.1.12. valid

valid()

Check if there is a current result item after calls to rewind() or next() Implements Iterator

Return type:bool

212.1.2. Constants

212.1.2.1. ATTRIBUTE_TO_LOWER

212.1.2.2. ATTRIBUTE_TO_UPPER

212.1.2.3. ATTRIBUTE_NATIVE