Back to index
Abstract filter for iterators. More...
|__construct (Iterator $it)|
|Constructs a filter around another iterator. |
|Rewind the inner iterator. |
|Accept function to decide whether an element of the inner iterator should be accessible through the Filteriterator. |
|Move to next element. |
|__call ($func, $params)|
|Aggregate the inner iterator. |
|Fetch next element and store it. |
|hidden __clone |
Abstract filter for iterators.
Instances of this class act as a filter around iterators. In other words you can put an iterator into the constructor and the instance will only return selected (accepted) elements.
The only thing that needs to be done to make this work is implementing method accept(). Typically this invloves reading the current element or key of the inner Iterator and checking whether it is acceptable.
Accept function to decide whether an element of the inner iterator should be accessible through the Filteriterator.