MovementResult
in package
FinalYes
Immutable summary of one cascade execution.
Tags
Table of Contents
Properties
- $events : array<string|int, mixed>
- $remaining : int|float
Methods
- __construct() : mixed
- deltas() : array<int, QuantityStateDelta>
- Aggregate per-slot quantity-state deltas for this result.
- isComplete() : bool
- Return true when the requested quantity was fully satisfied.
- ledgerEntries() : array<int, LedgerEntry>
- Convert each movement event to a ledger entry.
- mutations() : array<int, QuantityStateDelta>
Properties
$events read-only
public
array<string|int, mixed>
$events
$remaining read-only
public
int|float
$remaining
Methods
__construct()
public
__construct(array<int, MovementEvent> $events, int|float $remaining) : mixed
Parameters
- $events : array<int, MovementEvent>
- $remaining : int|float
Tags
deltas()
Aggregate per-slot quantity-state deltas for this result.
public
deltas() : array<int, QuantityStateDelta>
The output is stable in first-seen slot order, which makes it suitable for deterministic persistence and testing.
Return values
array<int, QuantityStateDelta>isComplete()
Return true when the requested quantity was fully satisfied.
public
isComplete() : bool
Return values
boolledgerEntries()
Convert each movement event to a ledger entry.
public
ledgerEntries([array<string, mixed> $context = [] ]) : array<int, LedgerEntry>
Parameters
- $context : array<string, mixed> = []
Return values
array<int, LedgerEntry>mutations()
public
mutations() : array<int, QuantityStateDelta>
use deltas() instead