<TKey, TValue, TIterator is RecursiveIterator<TKey, TValue>>
extends |
IteratorIterator<TKey, TValue, TIterator> |
---|---|
implements |
RecursiveIterator<TKey, TValue> |
Iterates over a recursive iterator, using a callback to determine which elements to descend into
Similar to {@see RecursiveCallbackFilterIterator}, but the callback is only used to filter the return value of {@see RecursiveIterator::hasChildren()}. This allows elements to be treated as leaf nodes even if they have children.
Methods | ||
---|---|---|
final
public
|
__construct(TIterator $iterator, callable(TValue, TKey, TIterator): bool $callback)
|
# |
public
|
hasChildren(): bool
|
# |
public
|
getChildren(): static<TKey, TValue, TIterator>|null
|
# |
Methods inherited from IteratorIterator |
---|
getInnerIterator(), rewind(), valid(), key(), current(), next() |