Reference
C
Class

ApiPlatform\Serializer\SerializerContextBuilder

Builds the context used by the Symfony Serializer.

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

Methods

__construct

public __construct(ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory)
public __construct(ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory)

Parameters

resourceMetadataFactoryApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface

createFromRequest

Creates a serialization context from a Request.

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

Parameters

requestSymfony\Component\HttpFoundation\Request
normalizationbool
attributesarray

Returns

array

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop