SlotFlow API Documentation

MovementEvent
in package

FinalYes

One applied movement with before-state snapshots for source and destination.

Tags
template-covariant

of int|float

Table of Contents

Properties

$edge  : MovementEdge
$initialFrom  : int|float|null
$initialTo  : int|float|null
$quantity  : int|float

Methods

__construct()  : mixed
deltas()  : array<int, QuantityStateDelta>
Convert this event to per-slot quantity-state deltas.
finalFrom()  : int|float|null
Return the source quantity after this movement, or null for nil sources.
finalTo()  : int|float|null
Return the destination quantity after this movement, or null for nil sinks.
ledgerEntry()  : LedgerEntry
Convert this event to a ledger entry.
mutations()  : array<int, QuantityStateDelta>

Properties

Methods

__construct()

public __construct(MovementEdge $edge, int|float $quantity, int|float|null $initialFrom, int|float|null $initialTo) : mixed
Parameters
$edge : MovementEdge
$quantity : int|float
$initialFrom : int|float|null
$initialTo : int|float|null
Tags
psalm-param

TQtty $quantity

psalm-param

?TQtty $initialFrom

psalm-param

?TQtty $initialTo

finalFrom()

Return the source quantity after this movement, or null for nil sources.

public finalFrom() : int|float|null
Return values
int|float|null

finalTo()

Return the destination quantity after this movement, or null for nil sinks.

public finalTo() : int|float|null
Return values
int|float|null

ledgerEntry()

Convert this event to a ledger entry.

public ledgerEntry([array<string, mixed> $context = [] ]) : LedgerEntry
Parameters
$context : array<string, mixed> = []
Return values
LedgerEntry

        
On this page

Search results