class RequestDataCollector extends RequestDataCollector

deprecated since version 4.1, to be removed in Symfony 5.0

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.

reset()

Resets this data collector to its initial state.

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

getResponseHeaders()

No description

getResponseCookies()

No description

getSessionMetadata()

No description

getFlashes()

No description

getContent()

No description

getContentType()

No description

getStatusText()

No description

getStatusCode()

No description

getFormat()

No description

getLocale()

No description

getDotenvVars()

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.

getForwardToken()

No description

onKernelController(FilterControllerEvent $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 37
serialize()

in DataCollector at line line 42
unserialize($data)

Parameters

$data

in RequestDataCollector at line line 30
__construct()

in RequestDataCollector at line line 38
collect(Request $request, Response $response, Exception $exception = null)

Collects data for the given Request and Response.

Parameters

Request $request
Response $response
Exception $exception

in RequestDataCollector at line line 167
lateCollect()

Collects data as late as possible.

in RequestDataCollector at line line 172
reset()

Resets this data collector to its initial state.

in RequestDataCollector at line line 178
getMethod()

in RequestDataCollector at line line 183
getPathInfo()

in RequestDataCollector at line line 188
getRequestRequest()

in RequestDataCollector at line line 193
getRequestQuery()

in RequestDataCollector at line line 198
getRequestHeaders()

in RequestDataCollector at line line 203
getRequestServer($raw = false)

Parameters

$raw

in RequestDataCollector at line line 208
getRequestCookies($raw = false)

Parameters

$raw

in RequestDataCollector at line line 213
getRequestAttributes()

in RequestDataCollector at line line 218
getResponseHeaders()

in RequestDataCollector at line line 223
getResponseCookies()

in RequestDataCollector at line line 228
getSessionMetadata()

in RequestDataCollector at line line 233
getSessionAttributes()

in RequestDataCollector at line line 238
getFlashes()

in RequestDataCollector at line line 243
getContent()

in RequestDataCollector at line line 248
getContentType()

in RequestDataCollector at line line 253
getStatusText()

in RequestDataCollector at line line 258
getStatusCode()

in RequestDataCollector at line line 263
getFormat()

in RequestDataCollector at line line 268
getLocale()

in RequestDataCollector at line line 273
getDotenvVars()

in RequestDataCollector at line line 285
string getRoute()

Gets the route name.

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

Return Value

string The route

in RequestDataCollector at line line 290
getIdentifier()

in RequestDataCollector at line line 302
array getRouteParams()

Gets the route parameters.

The routeparams request attributes is automatically set by the RouterListener.

Return Value

array The parameters

in RequestDataCollector at line line 313
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'

in RequestDataCollector at line line 324
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

in RequestDataCollector at line line 329
getForwardToken()

in RequestDataCollector at line line 334
onKernelController(FilterControllerEvent $event)

Parameters

FilterControllerEvent $event

in RequestDataCollector at line line 339
onKernelResponse(FilterResponseEvent $event)

Parameters

FilterResponseEvent $event

in RequestDataCollector at line line 350
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

in RequestDataCollector at line line 361
string getName()

Returns the name of the collector.

Return Value

string The collector name