Zum Inhalt springen

API reference

Quittio\Core\Serialization

quittio/core#

Quittio\Core\Serialization

  • ArrayHydratorBuilds DTOs from plain arrays (the inverse of ArrayNormalizer).
  • ArrayNormalizerConverts DTOs into plain arrays (scalars only) for JSON, storage and APIs.
  • JsonSchemaGeneratorGenerates the JSON Schema (draft 2020-12) of InvoiceData::toArray() from the constructor signatures and mapping attributes, so that the schema never drifts from the model.
  • JsonSchemaValidatorValidates JSON input against the shipped invoice schema before hydration (requires the optional package opis/json-schema).

Quittio\Core\Serialization\Snapshots

  • SnapshotUpcaster interfaceMigrates a stored invoice snapshot from one version to the next one.
  • SnapshotUpcasterChainBrings stored snapshots step by step to the current version (v1 → v2 → … → current).
  • SnapshotVersionExceptionA snapshot cannot be brought to the current version: an upcaster is missing, or the snapshot was written by a newer version of the package.

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