|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| __call ($func, $params) | |
| __construct (Iterator $it, $offset=0, $count=-1) | |
| current () | |
| getInnerIterator () | |
| getPosition () | |
| key () | |
| next () | |
| rewind () | |
| seek ($position) | |
| valid () | |
Private Attributes | |
| $count | |
| $it | |
| $offset | |
| $pos | |
Limited Iteration over another Iterator.
A class that starts iteration at a certain offset and only iterates over a specified amount of elements.
This class uses SeekableIterator::seek() if available and rewind() plus a skip loop otehrwise.
Definition at line 24 of file limititerator.inc.
| LimitIterator::__construct | ( | Iterator | $it, |
$offset = 0, |
|||
$count = -1 |
|||
| ) |
| LimitIterator::__call | ( | $func, | |
| $params | |||
| ) |
Aggregate the inner iterator.
| func | Name of method to invoke |
| params | Array of parameters to pass to method |
Definition at line 128 of file limititerator.inc.
| LimitIterator::current | ( | ) |
| LimitIterator::getInnerIterator | ( | ) |
Implements OuterIterator.
Definition at line 118 of file limititerator.inc.
References $it.
| LimitIterator::getPosition | ( | ) |
Definition at line 111 of file limititerator.inc.
References $pos.
| LimitIterator::key | ( | ) |
| LimitIterator::next | ( | ) |
Forward to nect element.
Implements Iterator.
Definition at line 103 of file limititerator.inc.
Referenced by seek().
| LimitIterator::rewind | ( | ) |
Rewind to offset specified in constructor.
Implements Iterator.
Definition at line 75 of file limititerator.inc.
References seek().

| LimitIterator::seek | ( | $position | ) |
Seek to specified position.
| position | offset to seek to (relative to beginning not offset specified in constructor). |
| exception | when position is invalid |
Definition at line 56 of file limititerator.inc.
References next().
Referenced by rewind().

| LimitIterator::valid | ( | ) |
Implements Iterator.
Definition at line 84 of file limititerator.inc.
|
private |
Definition at line 28 of file limititerator.inc.
Referenced by __construct().
|
private |
Definition at line 26 of file limititerator.inc.
Referenced by __construct(), and getInnerIterator().
|
private |
Definition at line 27 of file limititerator.inc.
Referenced by __construct().
|
private |
Definition at line 29 of file limititerator.inc.
Referenced by getPosition().
1.8.5