Zend\Ldap\Collection\DefaultIterator is the default collection iterator implementation using ext/ldap

 Methods

Constructor.

__construct(\Zend\Ldap\Ldap $ldap, resource $resultId) : \Zend\Ldap\Collection\DefaultIterator

Parameters

$resultId

resource

Exceptions

\Zend\Ldap\Exception\LdapException if no entries was found.

Returns

__destruct()

__destruct() 

Closes the current result set

close() : bool

Returns

bool

Returns the number of items in current result Implements Countable

count() : int

Returns

int

Return the current result item Implements Iterator

current() : array | null

Exceptions

\Zend\Ldap\Exception\LdapException

Returns

arraynull

Returns the currently set attribute name treatment

getAttributeNameTreatment() : int | \Zend\Ldap\Collection\callable

Returns

int\Zend\Ldap\Collection\callable

Gets the current LDAP connection.

getLDAP() : \Zend\Ldap\Ldap

Returns

Return the result item key Implements Iterator

key() : string | null

Exceptions

\Zend\Ldap\Exception\LdapException

Returns

stringnull

Rewind the Iterator to the first result item Implements Iterator

rewind() 

Sets the attribute name treatment.

setAttributeNameTreatment(int | \Zend\Ldap\Collection\callable $attributeNameTreatment) : \Zend\Ldap\Collection\DefaultIterator

Can either be one of the following constants - Zend\Ldap\Collection\DefaultIterator::ATTRIBUTE_TO_LOWER - Zend\Ldap\Collection\DefaultIterator::ATTRIBUTE_TO_UPPER - Zend\Ldap\Collection\DefaultIterator::ATTRIBUTE_NATIVE or a valid callback accepting the attribute's name as it's only argument and returning the new attribute's name.

Parameters

$attributeNameTreatment

int\Zend\Ldap\Collection\callable

Returns

\Zend\Ldap\Collection\DefaultIteratorProvides a fluent interface

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

valid() : bool

Returns

bool

 Properties

 

The method that will be applied to the attribute's names.

$attributeNameTreatment : integer | \Zend\Ldap\Collection\callable

 

Current result entry identifier

$current : resource

 

Number of items in query result

$itemCount : int

 

LDAP Connection

$ldap : \Zend\Ldap\Ldap

 

Result identifier resource

$resultId : resource

 Constants

 

ATTRIBUTE_NATIVE

ATTRIBUTE_NATIVE 

 

ATTRIBUTE_TO_LOWER

ATTRIBUTE_TO_LOWER 

 

ATTRIBUTE_TO_UPPER

ATTRIBUTE_TO_UPPER