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