$_unfolder
$_unfolder : callable
A function that is passed each element in this iterator and must return an array or Traversable object.
An iterator that can be used to generate nested iterators out of a collection of items by applying an function to each of the elements in this iterator.
__construct(array|\Traversable $items, callable $unfolder)
Creates the iterator that will generate child iterators from each of the elements it was constructed with.
array|\Traversable | $items | The list of values to iterate |
callable | $unfolder | A callable function that will receive the current item and key. It must return an array or Traversable object out of which the nested iterators will be yielded. |
Loading…