PHP Interface Pinq\Iterators\Standard\IIterator

.. $iterator->next(); } With Pinq extension: $iterator->rewind(); while (list($key, $value) = $iterator->fetch()) { ... } Or with value by reference: $iterator->rewind(); while ($element = $iterator->fetch()) { $key = $element[0]; $value =& $element[1]; ... } Iterators can implement this interface while maintaining compatibility with the native API.
Author: Elliot Levin ([email protected])
Inheritance: extends Iterator, extends Pinq\Iterators\IIterator
Datei anzeigen Open project: timetoogo/pinq Interface Usage Examples

Public Methods

Method Description
fetch ( ) : array | null If the current position is valid, returns an array with index zero as the key and index one as the value and advances the iterator to the next position or returns null if the current position is invalid.

Method Details

fetch() public method

If the current position is valid, returns an array with index zero as the key and index one as the value and advances the iterator to the next position or returns null if the current position is invalid.
public fetch ( ) : array | null
return array | null The element array or null if invalid position