Zend\Ldap\Collection wraps a list of LDAP entries.

 Methods

Constructor.

__construct(\Zend\Ldap\Collection\DefaultIterator $iterator) 

__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

Return the current result item DN

dn() : string | null

Returns

stringnull

Get first entry

getFirst() : array

Returns

array

Returns the underlying iterator

getInnerIterator() : \Zend\Ldap\Collection\DefaultIterator

Return the current result item key Implements Iterator

key() : int | null

Returns

intnull

Rewind the Iterator to the first result item Implements Iterator

rewind() 

Get all entries as an array

toArray() : array

Returns

array

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

valid() : bool

Returns

bool

Creates the data structure for the given entry data

createEntry(array $data) : array

Parameters

$data

array

Returns

array

 Properties

 

Container for item caching to speed up multiple iterations

$cache : array

 

Current item number

$current : integer

 

Iterator

$iterator : \Zend\Ldap\Collection\DefaultIterator