class Map_Iterator implements Iterator

Builds a map iterator around an Iterator. Called by Map

Methods

__construct(Iterator $items, string $keyField, string $titleField, array $firstItems = null, array $lastItems = null)

No description

mixed
rewind()

Rewind the Iterator to the first element.

mixed
current()

Return the current element.

string
key()

Return the key of the current element.

mixed
next()

Move forward to next element.

boolean
valid()

Checks if current position is valid.

Details

at line 36
__construct(Iterator $items, string $keyField, string $titleField, array $firstItems = null, array $lastItems = null)

Parameters

Iterator $items The iterator to build this map from
string $keyField The field to use for the keys
string $titleField The field to use for the values
array $firstItems An optional map of items to show first
array $lastItems An optional map of items to show last

at line 63
mixed rewind()

Rewind the Iterator to the first element.

Return Value

mixed

at line 90
mixed current()

Return the current element.

Return Value

mixed

at line 129
string key()

Return the key of the current element.

Return Value

string

at line 147
mixed next()

Move forward to next element.

Return Value

mixed

at line 187
boolean valid()

Checks if current position is valid.

Return Value

boolean