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

package Default

 Methods

Constructor.

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

Parameters

$iterator

\Zend\Ldap\Collection\DefaultIterator

__destruct()

__destruct() 

Closes the current result set

close() : boolean

Returns

boolean

Returns the number of items in current result Implements Countable

count() : integer

Returns

integer

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

Returns

\Zend\Ldap\Collection\DefaultIterator

Return the current result item key Implements Iterator

key() : integer | null

Returns

integernull

Move forward to next result item Implements Iterator

next() 

Exceptions

\Zend\Ldap\Exception\LdapException

Rewind the Iterator to the first result item Implements Iterator

rewind() 

Exceptions

\Zend\Ldap\Exception\LdapException

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() : boolean

Returns

boolean

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

Default

array()
 

Current item number

$current : integer

Default

-1
 

Iterator

$iterator : \Zend\Ldap\Collection\DefaultIterator

Default

null