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

package Default

 Methods

Constructor.

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

Parameters

$ldap

\Zend\Ldap\Ldap

$resultId

resource

Exceptions

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

Returns

\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

Returns the currently set attribute name treatment

getAttributeNameTreatment() : integer | callable

Returns

integercallable

Gets the current LDAP connection.

getLDAP() : \Zend\Ldap\Ldap

Returns

\Zend\Ldap\Ldap

Return the result item key Implements Iterator

key() : string | null

Exceptions

\Zend\Ldap\Exception\LdapException

Returns

stringnull

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

Sets the attribute name treatment.

setAttributeNameTreatment(integer|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

integercallable

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

Returns

boolean

 Properties

 

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

$attributeNameTreatment : integer | callable

Default

self::ATTRIBUTE_TO_LOWER
 

Current result entry identifier

$current : resource

Default

null
 

Number of items in query result

$itemCount : integer

Default

-1
 

LDAP Connection

$ldap : \Zend\Ldap\Ldap

Default

null
 

Result identifier resource

$resultId : resource

Default

null

 Constants

 

ATTRIBUTE_NATIVE

ATTRIBUTE_NATIVE = 3 
 

ATTRIBUTE_TO_LOWER

ATTRIBUTE_TO_LOWER = 1 
 

ATTRIBUTE_TO_UPPER

ATTRIBUTE_TO_UPPER = 2