} /**
* @param AbstractUid $object
*/
public function normalize(mixed
$object, string
$format = null, array
$context =
[]): array|string|int|float|bool|\ArrayObject|null
{ return match ($context[self::NORMALIZATION_FORMAT_KEY
] ??
$this->defaultContext
[self::NORMALIZATION_FORMAT_KEY
]) { self::NORMALIZATION_FORMAT_CANONICAL =>
(string) $object,
self::NORMALIZATION_FORMAT_BASE58 =>
$object->
toBase58(),
self::NORMALIZATION_FORMAT_BASE32 =>
$object->
toBase32(),
self::NORMALIZATION_FORMAT_RFC4122 =>
$object->
toRfc4122(),
default =>
throw new LogicException(sprintf('The "%s" format is not valid.',
$context[self::NORMALIZATION_FORMAT_KEY
] ??
$this->defaultContext
[self::NORMALIZATION_FORMAT_KEY
])),
};
} public function supportsNormalization(mixed
$data, string
$format = null, array
$context =
[]): bool
{ return $data instanceof AbstractUid;
} public function denormalize(mixed
$data, string
$type, string
$format = null, array
$context =
[]): mixed
{