Zend\Ldap\Collection\DefaultIterator
Zend\Ldap\Collection\DefaultIterator is the default collection iterator implementation using ext/ldap
Synopsis
class DefaultIterator
implements
Iterator,Countable
{
- // constants
- const ATTRIBUTE_TO_LOWER = 1;
- const ATTRIBUTE_TO_UPPER = 2;
- const ATTRIBUTE_NATIVE = 3;
- // members
- protected Ldap $ldap;
- protected resource $resultId;
- protected resource $current;
- protected integer $itemCount;
- protected integer|callable $attributeNameTreatment;
- // methods
- public DefaultIterator __construct()
- public void __destruct()
- public bool close()
- public Ldap getLDAP()
- public DefaultIterator setAttributeNameTreatment()
- public int|callable getAttributeNameTreatment()
- public int count()
- public array|null current()
- public string|null key()
- public void next()
- public void rewind()
- public bool valid()
Hierarchy
Constants
Name | Value |
---|---|
ATTRIBUTE_TO_LOWER | 1 |
ATTRIBUTE_TO_UPPER | 2 |
ATTRIBUTE_NATIVE | 3 |
Members
protected
- $attributeNameTreatment
—
Zend\Ldap\Collection\integer|callable
The method that will be applied to the attribute's names. - $current
—
resource
Current result entry identifier - $itemCount
—
int
Number of items in query result - $ldap
—
\Zend\Ldap\Ldap
LDAP Connection - $resultId
—
resource
Result identifier resource
Methods
public
- __construct() — Constructor.
- __destruct()
- close() — Closes the current result set
- count() — Returns the number of items in current result Implements Countable
- current() — Return the current result item Implements Iterator
- getAttributeNameTreatment() — Returns the currently set attribute name treatment
- getLDAP() — Gets the current LDAP connection.
- key() — Return the result item key Implements Iterator
- next() — Move forward to next result item Implements Iterator
- rewind() — Rewind the Iterator to the first result item Implements Iterator
- setAttributeNameTreatment() — Sets the attribute name treatment.
- valid() — Check if there is a current result item after calls to rewind() or next() Implements Iterator