Decorates the output with JSON-LD metadata when appropriate, but otherwise just passes through to the decorated normalizer.
class ApiPlatform\JsonLd\Serializer\ObjectNormalizer implements Symfony\Component\Serializer\Normalizer\NormalizerInterface, ApiPlatform\Serializer\CacheableSupportsMethodInterface
{
public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $decorated, |`<a href="/docs/main/references/Api/IriConverterInterface">ApiPlatform\Api\IriConverterInterface</a>` $iriConverter, `<a href="/docs/main/references/JsonLd/AnonymousContextBuilderInterface">ApiPlatform\JsonLd\AnonymousContextBuilderInterface $anonymousContextBuilder)
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 __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $decorated, |`<a href="/docs/main/references/Api/IriConverterInterface">ApiPlatform\Api\IriConverterInterface</a>` $iriConverter, `<a href="/docs/main/references/JsonLd/AnonymousContextBuilderInterface">ApiPlatform\JsonLd\AnonymousContextBuilderInterface $anonymousContextBuilder)
decorated | Symfony\Component\Serializer\Normalizer\NormalizerInterface | |
iriConverter | `ApiPlatform\Metadata\IriConverterInterface` `ApiPlatform\Api\IriConverterInterface` | |
anonymousContextBuilder | `ApiPlatform\JsonLd\AnonymousContextBuilderInterface` |
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
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