19declare(strict_types=1);
41 public function normalize($value): array|float|bool|
int|string|null
43 if ($value instanceof
Uuid) {
44 return $value->toString();
51 public function denormalize(array|
float|
bool|
int|
string|
null $value,
string $type):
Uuid
53 return $this->
factory->fromString((
string) $value);
denormalize(array|float|bool|int|string|null $value, string $type)
Converts a normalized form back into a value.
normalize($value)
Converts a value into a normalized form.
readonly Factory $factory
Exception thrown when a value cannot be normalized or denormalized.
A Normalizer is responsible for converting a value into a normalized form and back.