class RewindableGenerator implements Countable, IteratorAggregate

Properties

protected callable $generator

The generator callback.

protected callable|int $count

The number of tagged services.

Methods

__construct(callable $generator, callable|int $count)

Create a new generator instance.

getIterator()

Get an iterator from the generator.

int
count()

Get the total number of tagged services.

Details

at line 30
__construct(callable $generator, callable|int $count)

Create a new generator instance.

Parameters

callable $generator
callable|int $count

at line 39
Traversable getIterator()

Get an iterator from the generator.

Return Value

Traversable

at line 47
int count()

Get the total number of tagged services.

Return Value

int