MediaWiki
REL1_21
|
Convenience class for generating iterators from iterators. More...
Public Member Functions | |
__construct ($iter, Closure $vCallback) | |
Build an new iterator from a base iterator by having the former wrap the later, returning the result of "value" callback for each current() invocation. | |
current () | |
key () | |
next () | |
rewind () | |
valid () | |
Protected Attributes | |
Iterator | $baseIterator |
* | |
Closure | $vCallback |
* |
Convenience class for generating iterators from iterators.
Definition at line 29 of file MappedIterator.php.
MappedIterator::__construct | ( | $ | iter, |
Closure $ | vCallback | ||
) |
Build an new iterator from a base iterator by having the former wrap the later, returning the result of "value" callback for each current() invocation.
The callback takes the result of current() on the base iterator as an argument. The keys of the base iterator are reused verbatim.
Iterator | Array | $iter | |
Closure | $vCallback |
MWException |
Definition at line 43 of file MappedIterator.php.
Definition at line 64 of file MappedIterator.php.
Definition at line 74 of file MappedIterator.php.
Definition at line 84 of file MappedIterator.php.
Definition at line 57 of file MappedIterator.php.
Definition at line 91 of file MappedIterator.php.
Iterator MappedIterator::$baseIterator [protected] |
*
Definition at line 30 of file MappedIterator.php.
Closure MappedIterator::$vCallback [protected] |
*
Definition at line 31 of file MappedIterator.php.