Replayer
in package
FinalYes
Re-executes a workflow generator against committed, sequence-ordered history.
Table of Contents
Properties
Methods
- __construct() : mixed
- replay() : ReplayResult
- assertNoRemainingSteps() : void
- commandDetail() : string|null
- completeCommand() : array{type: string, result: array{codec: string, blob: string}}
- decodeResult() : mixed
- payloadDetail() : string|null
- recordedSteps() : array<int, Throwable}>
- resolvedStep() : Throwable}
- sequence() : int|null
- step() : Throwable}
Properties
$codec read-only
private
PayloadCodec
$codec
Methods
__construct()
public
__construct(PayloadCodec $codec) : mixed
Parameters
- $codec : PayloadCodec
replay()
public
replay(callable(WorkflowContext, mixed ...$input): mixed $handler, array<int, array<string, mixed>> $history, array<int, mixed> $input, string $taskQueue[, array<string, mixed> $task = [] ]) : ReplayResult
Parameters
- $handler : callable(WorkflowContext, mixed ...$input): mixed
- $history : array<int, array<string, mixed>>
- $input : array<int, mixed>
- $taskQueue : string
- $task : array<string, mixed> = []
Return values
ReplayResultassertNoRemainingSteps()
private
assertNoRemainingSteps(array<int, Throwable}> $steps, int $stepCursor, string $terminalCommand) : void
Parameters
- $steps : array<int, Throwable}>
- $stepCursor : int
- $terminalCommand : string
commandDetail()
private
commandDetail(WorkflowCommand $command) : string|null
Parameters
- $command : WorkflowCommand
Return values
string|nullcompleteCommand()
private
completeCommand(mixed $result) : array{type: string, result: array{codec: string, blob: string}}
Parameters
- $result : mixed
Return values
array{type: string, result: array{codec: string, blob: string}}decodeResult()
private
decodeResult(array<string, mixed> $payload) : mixed
Parameters
- $payload : array<string, mixed>
payloadDetail()
private
payloadDetail(array<string, mixed> $payload, string $shape) : string|null
Parameters
- $payload : array<string, mixed>
- $shape : string
Return values
string|nullrecordedSteps()
private
recordedSteps(array<int, array<string, mixed>> $history) : array<int, Throwable}>
Parameters
- $history : array<int, array<string, mixed>>
Return values
array<int, Throwable}>resolvedStep()
private
resolvedStep(int $sequence, string $shape, mixed $value[, Throwable|null $failure = null ][, string|null $detail = null ]) : Throwable}
Parameters
- $sequence : int
- $shape : string
- $value : mixed
- $failure : Throwable|null = null
- $detail : string|null = null
Return values
Throwable}sequence()
private
sequence(array<string, mixed> $payload) : int|null
Parameters
- $payload : array<string, mixed>
Return values
int|nullstep()
private
step(int $sequence, string $shape[, string|null $detail = null ]) : Throwable}
Parameters
- $sequence : int
- $shape : string
- $detail : string|null = null