\Horde_Lens_Iterator

Summary

Methods
Properties
Constants
__construct()
setLens()
rewind()
next()
valid()
key()
current()
getInnerIterator()
__call()
No public properties found
No constants found
No protected methods found
$_d
N/A
No private methods found
$_i
N/A

Properties

$_d

$_d : \Horde_Lens_Interface

The Decorator that will observe each element of the iterator.

Type

\Horde_Lens_Interface

$_i

$_i : \Iterator

The Iterator to decorate.

Type

\Iterator

Methods

__construct()

__construct(\Iterator  $i,   $d = null) 

Constructs a decorator around an iterator using a single Horde_Lens_Interface object, which decorates the current() element of the iterator. The decorator is like a lens, decotrating one element at a time, instead of having a decorator for every element in the list.

Parameters

\Iterator $i

The iterator to decorate.

$d

setLens()

setLens(\Horde_Lens_Interface  $d) 

Set or change the Lens modifying the inner iterator. Sets the current object of the lens automatically and returns the lens.

Parameters

\Horde_Lens_Interface $d

rewind()

rewind() 

Rewind the inner iterator.

next()

next() : void

Move to next element.

valid()

valid() : \Whether

Returns

\Whether —

more elements are available.

key()

key() : \The

Returns

\The —

current key.

current()

current() : \The

Returns

\The —

current value.

getInnerIterator()

getInnerIterator() : \Iterator

Returns

\Iterator —

The inner iterator.

__call()

__call(  $func,   $params) 

Aggregate the inner iterator.

Parameters

$func
$params