Zend_Ldap_Collection_Iterator_Default is the default collection iterator implementation using ext/ldap

category Zend
package Zend_Ldap
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor.

__construct(\Zend_Ldap $ldap, resource $resultId) : void

Parameters

$ldap

\Zend_Ldap

$resultId

resource

__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

Returns

arraynull

Returns the currently set attribute name treatment

getAttributeNameTreatment() : integer | callback

Returns

integercallback

Gets the current LDAP connection.

getLdap() : \Zend_Ldap

Returns

\Zend_Ldap

Return the result item key Implements Iterator

key() : string | null

Returns

stringnull

Move forward to next result item Implements Iterator

next() 

Exceptions

\Zend_Ldap_Exception

Rewind the Iterator to the first result item Implements Iterator

rewind() 

Exceptions

\Zend_Ldap_Exception

Sets the attribute name treatment.

setAttributeNameTreatment(integer|callback $attributeNameTreatment) : \Zend_Ldap_Collection_Iterator_Default

Can either be one of the following constants

  • Zend_Ldap_Collection_Iterator_Default::ATTRIBUTE_TO_LOWER
  • Zend_Ldap_Collection_Iterator_Default::ATTRIBUTE_TO_UPPER
  • Zend_Ldap_Collection_Iterator_Default::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

integercallback

Returns

\Zend_Ldap_Collection_Iterator_DefaultProvides 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 | callback

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

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