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#
| Method | Description |
|---|---|
->from() | Version this upcaster reads; it produces version from() + 1. |
->upcast() |
from()#
public function from(): intVersion this upcaster reads; it produces version from() + 1.
- Returns
int
upcast()#
public function upcast(array<string, mixed> $snapshot): array<string, mixed>| Parameter | Type | Description |
|---|---|---|
$snapshot | array<string, mixed> | without the "_version" key |
- Returns
array<string, mixed>