AddRequestFormatsListener
in package
implements
EventSubscriberInterface
Adds configured formats to each request.
Tags
Interfaces, Classes, Traits and Enums
- EventSubscriberInterface
- An EventSubscriber knows itself what events it is interested in.
Table of Contents
- $formats : mixed
- __construct() : mixed
- getSubscribedEvents() : array<string|int, mixed>
- Returns an array of event names this subscriber wants to listen to.
- onKernelRequest() : mixed
- Adds request formats.
Properties
$formats
protected
mixed
$formats
Methods
__construct()
public
__construct(array<string|int, mixed> $formats) : mixed
Parameters
- $formats : array<string|int, mixed>
Return values
mixed —getSubscribedEvents()
Returns an array of event names this subscriber wants to listen to.
public
static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed> —The event names to listen to
onKernelRequest()
Adds request formats.
public
onKernelRequest(GetResponseEvent $event) : mixed
Parameters
- $event : GetResponseEvent