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#
| Method | Description |
|---|---|
->normalize() | |
->value() |
normalize()#
public function normalize(object $dto): array<string, mixed>| Parameter | Type | Description |
|---|---|---|
$dto | object |
- Returns
array<string, mixed>
value()#
public function value(mixed $value): mixed| Parameter | Type | Description |
|---|---|---|
$value | mixed |
- Returns
mixed