AddRequestFormatsListener
in package
implements
EventSubscriberInterface
Adds configured formats to each request.
Tags
Interfaces, Classes and Traits
- EventSubscriberInterface
- An EventSubscriber knows itself what events it is interested in.
Table of Contents
- $formats : mixed
- __construct() : mixed
-
getSubscribedEvents()
: array<string, string|array{0: string, 1: int}|list
> - 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, string|array{0: string, 1: int}|list>
Return values
array<string, string|array{0: string, 1: int}|listonKernelRequest()
Adds request formats.
public
onKernelRequest(RequestEvent $event) : mixed
Parameters
- $event : RequestEvent