Decorates the output with JSON HAL metadata when appropriate, but otherwise just passes through to the decorated normalizer.
class ApiPlatform\Hal\Serializer\ObjectNormalizer implements Symfony\Component\Serializer\Normalizer\NormalizerInterface, Symfony\Component\Serializer\Normalizer\DenormalizerInterface, ApiPlatform\Serializer\CacheableSupportsMethodInterface
{
public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $decorated, |`<a href="/docs/main/references/Api/IriConverterInterface">ApiPlatform\Api\IriConverterInterface $iriConverter)
public supportsNormalization($data, null|string $format, array $context): bool
public getSupportedTypes($format): array
public hasCacheableSupportsMethod(): bool
public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
public supportsDenormalization($data, string $type, null|string $format, array $context): bool
public denormalize($data, string $type, null|string $format, array $context)
}
public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $decorated, |`<a href="/docs/main/references/Api/IriConverterInterface">ApiPlatform\Api\IriConverterInterface $iriConverter)
decorated | Symfony\Component\Serializer\Normalizer\NormalizerInterface | |
iriConverter | `ApiPlatform\Metadata\IriConverterInterface` `ApiPlatform\Api\IriConverterInterface` |
Checks whether the given class is supported for normalization by this normalizer.
public supportsNormalization($data, null|string $format, array $context): bool
data | ||
format | string | |
context | array |
bool
public getSupportedTypes($format): array
format |
array
public hasCacheableSupportsMethod(): bool
bool
Normalizes an object into a set of arrays/scalars.
public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
object | ||
format | string | |
context | array |
ArrayObject
array
string
int
float
bool
Checks whether the given class is supported for denormalization by this normalizer.
public supportsDenormalization($data, string $type, null|string $format, array $context): bool
data | ||
type | string | |
format | string | |
context | array |
bool
Denormalizes data back into an object of the given class.
public denormalize($data, string $type, null|string $format, array $context)
data | ||
type | string | |
format | string | |
context | array |
Made with love by
Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.
Learn more