PHP Class ApiPlatform\Core\EventListener\DeserializeListener

Author: Kévin Dunglas ([email protected])
Afficher le fichier Open project: api-platform/core Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Symfony\Component\Serializer\SerializerInterface $serializer, ApiPlatform\Core\Serializer\SerializerContextBuilderInterface $serializerContextBuilder, array $formats )
onKernelRequest ( GetResponseEvent $event ) Deserializes the data sent in the requested format.

Private Methods

Méthode Description
getFormat ( Request $request ) : string Extracts the format from the Content-Type header and check that it is supported.

Method Details

__construct() public méthode

public __construct ( Symfony\Component\Serializer\SerializerInterface $serializer, ApiPlatform\Core\Serializer\SerializerContextBuilderInterface $serializerContextBuilder, array $formats )
$serializer Symfony\Component\Serializer\SerializerInterface
$serializerContextBuilder ApiPlatform\Core\Serializer\SerializerContextBuilderInterface
$formats array

onKernelRequest() public méthode

Deserializes the data sent in the requested format.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent