class RequestDataCollector extends DataCollector implements EventSubscriberInterface, LateDataCollectorInterface

RequestDataCollector.

Methods

serialize()

No description

unserialize($data)

No description

__construct()

No description

collect(Request $request, Response $response, Exception $exception = null)

Collects data for the given Request and Response.

lateCollect()

Collects data as late as possible.

getMethod()

No description

getPathInfo()

No description

getRequestRequest()

No description

getRequestQuery()

No description

getRequestHeaders()

No description

getRequestServer($raw = false)

No description

getRequestCookies($raw = false)

No description

getRequestAttributes()

No description

getResponseHeaders()

No description

getResponseCookies()

No description

getSessionMetadata()

No description

getSessionAttributes()

No description

getFlashes()

No description

getContent()

No description

getContentType()

No description

getStatusText()

No description

getStatusCode()

No description

getFormat()

No description

getLocale()

No description

string
getRoute()

Gets the route name.

getIdentifier()

No description

array
getRouteParams()

Gets the route parameters.

array|string
getController()

Gets the parsed controller.

array|bool
getRedirect()

Gets the previous request attributes.

onKernelController(FilterControllerEvent $event)

No description

onKernelResponse(FilterResponseEvent $event)

No description

static array
getSubscribedEvents()

Returns an array of event names this subscriber wants to listen to.

string
getName()

Returns the name of the collector.

Details

in DataCollector at line line 44
serialize()

in DataCollector at line line 49
unserialize($data)

Parameters

$data

at line line 32
__construct()

at line line 40
collect(Request $request, Response $response, Exception $exception = null)

Collects data for the given Request and Response.

Parameters

Request $request A Request instance
Response $response A Response instance
Exception $exception An Exception instance

at line line 154
lateCollect()

Collects data as late as possible.

at line line 159
getMethod()

at line line 164
getPathInfo()

at line line 169
getRequestRequest()

at line line 174
getRequestQuery()

at line line 179
getRequestHeaders()

at line line 184
getRequestServer($raw = false)

Parameters

$raw

at line line 189
getRequestCookies($raw = false)

Parameters

$raw

at line line 194
getRequestAttributes()

at line line 199
getResponseHeaders()

at line line 204
getResponseCookies()

at line line 209
getSessionMetadata()

at line line 214
getSessionAttributes()

at line line 219
getFlashes()

at line line 224
getContent()

at line line 229
getContentType()

at line line 234
getStatusText()

at line line 239
getStatusCode()

at line line 244
getFormat()

at line line 249
getLocale()

at line line 261
string getRoute()

Gets the route name.

The _route request attributes is automatically set by the Router Matcher.

Return Value

string The route

at line line 266
getIdentifier()

at line line 278
array getRouteParams()

Gets the route parameters.

The routeparams request attributes is automatically set by the RouterListener.

Return Value

array The parameters

at line line 289
array|string getController()

Gets the parsed controller.

Return Value

array|string The controller as a string or array of data with keys 'class', 'method', 'file' and 'line'

at line line 300
array|bool getRedirect()

Gets the previous request attributes.

Return Value

array|bool A legacy array of data from the previous redirection response or false otherwise

at line line 305
onKernelController(FilterControllerEvent $event)

Parameters

FilterControllerEvent $event

at line line 310
onKernelResponse(FilterResponseEvent $event)

Parameters

FilterResponseEvent $event

at line line 321
static array getSubscribedEvents()

Returns an array of event names this subscriber wants to listen to.

The array keys are event names and the value can be:

  • The method name to call (priority defaults to 0)
  • An array composed of the method name to call and the priority
  • An array of arrays composed of the method names to call and respective priorities, or 0 if unset

For instance:

  • array('eventName' => 'methodName')
  • array('eventName' => array('methodName', $priority))
  • array('eventName' => array(array('methodName1', $priority), array('methodName2')))

Return Value

array The event names to listen to

at line line 332
string getName()

Returns the name of the collector.

Return Value

string The collector name