class NoRewindIterator extends IteratorIterator (View source)

This iterator cannot be rewinded.

Methods

__construct(Traversable $iterator)

Construct a NoRewindIterator

Iterator|null
getInnerIterator()

Get the inner iterator

void
rewind()

Prevents the rewind operation on the inner iterator.

bool
valid()

Validates the iterator

mixed
key()

Get the current key

mixed
current()

Get the current value

void
next()

Forward to the next element

Details

__construct(Traversable $iterator)

Construct a NoRewindIterator

Parameters

Traversable $iterator

Iterator|null getInnerIterator()

Get the inner iterator

Return Value

Iterator|null

The inner iterator for the current entry.

void rewind()

Prevents the rewind operation on the inner iterator.

Return Value

void

Any returned value is ignored.

bool valid()

Validates the iterator

Return Value

bool

The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

mixed key()

Get the current key

Return Value

mixed

TKey on success, or null on failure.

mixed current()

Get the current value

Return Value

mixed

Can return any type.

void next()

Forward to the next element

Return Value

void

Any returned value is ignored.