References SerializerContextBuilder
Reference
C
Class

ApiPlatform\Serializer\SerializerContextBuilder

Builds the context used by the Symfony Serializer.

class ApiPlatform\Serializer\SerializerContextBuilder implements , `<a href="/docs/main/references/State/SerializerContextBuilderInterface">ApiPlatform\State\SerializerContextBuilderInterface
{
    public __construct(null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, bool $debug)
    public createFromRequest(Symfony\Component\HttpFoundation\Request $request, bool $normalization, null|array $attributes): array
}

Methods

__construct

public __construct(null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, bool $debug)

Parameters

resourceMetadataFactory`ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface`
debugbool

createFromRequest

Creates a serialization context from a Request.Creates a serialization context from a Request.

public createFromRequest(Symfony\Component\HttpFoundation\Request $request, bool $normalization, null|array $attributes): array

Parameters

requestSymfony\Component\HttpFoundation\Request
normalizationbool
attributesarray

Returns

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

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop