class SS_Map_Iterator implements Iterator (View source)

Builds a map iterator around an Iterator. Called by SS_Map

Methods

__construct(Iterator $items, string $keyField, string $titleField, $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.

bool
valid()

Checks if current position is valid.

Details

__construct(Iterator $items, string $keyField, string $titleField, $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

$firstItems
array $lastItems

An optional map of items to show last

mixed rewind()

Rewind the Iterator to the first element.

Return Value

mixed

mixed current()

Return the current element.

Return Value

mixed

string key()

Return the key of the current element.

Return Value

string

mixed next()

Move forward to next element.

Return Value

mixed

bool valid()

Checks if current position is valid.

Return Value

bool