Zum Inhalt springen

API reference / Quittio \ Core \ Serialization

ArrayNormalizer

final class in quittio/core

Quittio\Core\Serialization\ArrayNormalizer · Source

Converts DTOs into plain arrays (scalars only) for JSON, storage and APIs.

Values equal to the constructor default are omitted to keep the output compact; the hydrator restores them from the defaults.

Methods#

MethodDescription
->normalize()
->value()

normalize()#

public function normalize(object $dto): array<string, mixed>
ParameterTypeDescription
$dtoobject
Returns
array<string, mixed>

value()#

public function value(mixed $value): mixed
ParameterTypeDescription
$valuemixed
Returns
mixed

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