RecursiveFilterIterator
abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator (View source)
This abstract iterator filters out unwanted values for a RecursiveIterator.
This class should be extended to implement custom filters. The RecursiveFilterIterator::accept must be implemented in the subclass.
Methods
Check whether the inner iterator's current element has children
Return the inner iterator's children contained in a RecursiveFilterIterator
Details
__construct(Traversable $iterator)
Create a RecursiveFilterIterator from a RecursiveIterator
Iterator|null
getInnerIterator()
Get the inner iterator
void
rewind()
Rewind the iterator
bool
valid()
Check whether the current element is valid
mixed
key()
Get the current key
mixed
current()
Get the current element value
void
next()
Move the iterator forward
abstract bool
accept()
Check whether the current element of the iterator is acceptable
bool
hasChildren()
Check whether the inner iterator's current element has children
RecursiveIterator|null
getChildren()
Return the inner iterator's children contained in a RecursiveFilterIterator