StepRunner
Methods
- __construct() : mixed
- endLoaders() : array<string|int, Throwable>
- A NestedLoader forwards discard() to its writes, so each step is ended directly - there is no user-supplied wrapper left to distrust.
- run() : Generator<null|Signal, void>
- $input through one run of loaders and transformers: drops empty batches, ends its loaders when the run ends. A corrupted record goes to the source's reject loader, loaded and ended like the run's own loaders; without one it fails the run, whatever the error handler.
- steps() : Generator<null|Signal, void>
- $input through every step and the breaker: every run of loaders and transformers between two processors or joins goes to run(), an empty run included, and one more after the breaker. A join reads the rows of its right plan; a branch runs as the step that feeds it.
Methods
__construct()
public
__construct([StepTelemetry $telemetry = new StepTelemetry() ][, WriteLoaderFactory $writes = new WriteLoaderFactory() ]) : mixed
Parameters
- $telemetry : StepTelemetry = new StepTelemetry()
- $writes : WriteLoaderFactory = new WriteLoaderFactory()
endLoaders()
A NestedLoader forwards discard() to its writes, so each step is ended directly - there is no user-supplied wrapper left to distrust.
public
endLoaders(array<string|int, Loader|NestedLoader> $loaders, FlowContext $context, bool $completed) : array<string|int, Throwable>
Parameters
- $loaders : array<string|int, Loader|NestedLoader>
- $context : FlowContext
- $completed : bool
Return values
array<string|int, Throwable> —failures raised while ending, empty when the run did not complete
run()
$input through one run of loaders and transformers: drops empty batches, ends its loaders when the run ends. A corrupted record goes to the source's reject loader, loaded and ended like the run's own loaders; without one it fails the run, whatever the error handler.
public
run(array<int, Loader|NestedLoader|Transformer> $steps, Generator<string|int, CorruptedRecordException|Rows> $input, FlowContext $context[, null|Extractor|Reader $source = null ]) : Generator<null|Signal, void>
Parameters
- $steps : array<int, Loader|NestedLoader|Transformer>
-
one run between two processors
- $input : Generator<string|int, CorruptedRecordException|Rows>
- $context : FlowContext
- $source : null|Extractor|Reader = null
-
the source $input comes from directly, so its failures reach the error handler and its corrupted records its reject loader
Return values
Generator<null|Signal, void>steps()
$input through every step and the breaker: every run of loaders and transformers between two processors or joins goes to run(), an empty run included, and one more after the breaker. A join reads the rows of its right plan; a branch runs as the step that feeds it.
public
steps(PipelineSteps $steps, Generator<string|int, CorruptedRecordException|Rows> $input, FlowContext $context[, null|Extractor|Reader $source = null ][, null|RunCounts $counts = null ]) : Generator<null|Signal, void>
Parameters
- $steps : PipelineSteps
- $input : Generator<string|int, CorruptedRecordException|Rows>
- $context : FlowContext
- $source : null|Extractor|Reader = null
-
the source $input comes from directly, so its failures reach the error handler and its corrupted records its reject loader
- $counts : null|RunCounts = null
-
counts the rows the sources of a join's right plan yield