Zum Inhalt springen

API reference / Quittio \ Core \ Serialization \ Snapshots

SnapshotUpcaster

interface in quittio/core

Quittio\Core\Serialization\Snapshots\SnapshotUpcaster · Source

Migrates a stored invoice snapshot from one version to the next one.

Snapshots of issued invoices are never rewritten; upcasters run in memory on read.

Methods#

MethodDescription
->from()Version this upcaster reads; it produces version from() + 1.
->upcast()

from()#

public function from(): int

Version this upcaster reads; it produces version from() + 1.

Returns
int

upcast()#

public function upcast(array<string, mixed> $snapshot): array<string, mixed>
ParameterTypeDescription
$snapshotarray<string, mixed>without the "_version" key
Returns
array<string, mixed>

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.