final class BlessScanIterator implements Iterator (View source)

Lazily iterates the keys of BLESS SCAN, fetching one page at a time. Rewinding restarts the scan once a key has been consumed.

Methods

mixed
current()

Returns the current key name, or null when the scan has finished.

mixed
key()

Returns the position of the current key, or null when the scan has finished.

void
next()

Moves to the next key.

void
rewind()

Restarts the scan if any keys have been consumed.

bool
valid()

Returns whether there is a current key, fetching pages as needed.

Details

mixed current()

Returns the current key name, or null when the scan has finished.

Return Value

mixed

Can return any type.

mixed key()

Returns the position of the current key, or null when the scan has finished.

Return Value

mixed

TKey on success, or null on failure.

void next()

Moves to the next key.

Return Value

void

Any returned value is ignored.

void rewind()

Restarts the scan if any keys have been consumed.

Return Value

void

Any returned value is ignored.

bool valid()

Returns whether there is a current key, fetching pages as needed.

Return Value

bool

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