Methods |
public
|
collectThen(
(Closure(array<TInput> $results, static $pipeline, TArgument $arg): iterable<TOutput>)|(Closure(array<TOutput> $results, static $pipeline, TArgument $arg): iterable<TOutput>) $closure,
): static
Pass results to a closure in batches
Pass results to a closure in batches
{@see StreamPipelineInterface::collectThen()} can only be called once per
pipeline, and only if {@see BasePipelineInterface::then()} is not also
called.
Values returned by the closure are returned to the caller via a
forward-only iterator.
Implemented by
|
#
|
public
|
collectThenIf(
(Closure(array<TInput> $results, static $pipeline, TArgument $arg): iterable<TOutput>)|(Closure(array<TOutput> $results, static $pipeline, TArgument $arg): iterable<TOutput>) $closure,
): static
Pass results to a closure in batches if collectThen() hasn't already been
called
Pass results to a closure in batches if collectThen() hasn't already been
called
Implemented by
|
#
|
public
|
unless(Closure(TOutput|null $result, static $pipeline, TArgument $arg): bool $filter): static
Apply a filter to each result
Apply a filter to each result
{@see StreamPipelineInterface::unless()} can only be called once per
pipeline.
If $filter returns false , $result is returned to the caller,
otherwise it is discarded.
Implemented by
|
#
|
public
|
unlessIf(Closure(TOutput|null $result, static $pipeline, TArgument $arg): bool $filter): static
Apply a filter to each result if unless() hasn't already been called
Apply a filter to each result if unless() hasn't already been called
Implemented by
|
#
|
public
|
start(): iterable<TOutput>
Run the pipeline with each of the payload's values and return the results
via a forward-only iterator
Run the pipeline with each of the payload's values and return the results
via a forward-only iterator
Implemented by
|
#
|
public
|
startInto<TNextOutput>(
PipelineInterface<TOutput, TNextOutput, TArgument> $next,
): StreamPipelineInterface<TOutput, TNextOutput, TArgument>
Run the pipeline and pass each result to another pipeline
Run the pipeline and pass each result to another pipeline
Implemented by
|
#
|