SlotFlow API Documentation

MovementResult
in package

FinalYes

Immutable summary of one cascade execution.

Tags
template-covariant

of int|float

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

Methods

__construct()

public __construct(array<int, MovementEvent$events, int|float $remaining) : mixed
Parameters
$events : array<int, MovementEvent>
$remaining : int|float
Tags
psalm-param

list<MovementEvent<TQtty>> $events

psalm-param

TQtty $remaining

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
bool

ledgerEntries()

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>

        
On this page

Search results