References DocumentationNormalizer
Reference
C
Class

ApiPlatform\Hydra\Serializer\DocumentationNormalizer

Creates a machine readable Hydra API documentation.

Methods

__construct

Parameters

resourceMetadataFactory`ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface`
propertyNameCollectionFactory`ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface`
propertyMetadataFactory`ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface`
resourceClassResolver`ApiPlatform\Metadata\ResourceClassResolverInterface`
`ApiPlatform\Api\ResourceClassResolverInterface`
urlGenerator`ApiPlatform\Metadata\UrlGeneratorInterface`
`ApiPlatform\Api\UrlGeneratorInterface`
nameConverterSymfony\Component\Serializer\NameConverter\NameConverterInterface

normalize

Normalizes an object into a set of arrays/scalars.

public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool

Parameters

object
formatstring
contextarray

Returns

ArrayObject
array
string
int
float
bool

supportsNormalization

Checks whether the given class is supported for normalization by this normalizer.

public supportsNormalization($data, null|string $format, array $context): bool

Parameters

data
formatstring
contextarray

Returns

bool

getSupportedTypes

public getSupportedTypes($format): array

Parameters

format

Returns

array

hasCacheableSupportsMethod

public hasCacheableSupportsMethod(): bool

Returns

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

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop