class RequestDataCollector extends RequestDataCollector

deprecated since Symfony 4.1

RequestDataCollector.

Properties

protected $data from DataCollector
protected $controllers from RequestDataCollector

Methods

serialize()

No description

unserialize($data)

No description

cloneVar(mixed $var)

Converts the variable into a serializable Data instance.

callable[]
getCasters()

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()

No description

getMethod()

No description

getPathInfo()

No description

getRequestRequest()

No description

getRequestQuery()

No description

getRequestFiles()

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

static array
getSubscribedEvents()

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

string
getName()

Returns the name of the collector.

array|string
parseController(mixed $controller)

Parse a controller.

Details

in DataCollector at line 37
serialize()

in DataCollector at line 42
unserialize($data)

Parameters

$data

in DataCollector at line 57
protected Data cloneVar(mixed $var)

Converts the variable into a serializable Data instance.

This array can be displayed in the template using the VarDumper component.

Parameters

mixed $var

Return Value

Data

in DataCollector at line 77
protected callable[] getCasters()

Return Value

callable[] The casters to add to the cloner

in RequestDataCollector at line 30
__construct()

in RequestDataCollector at 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 180
lateCollect()

Collects data as late as possible.

in RequestDataCollector at line 185
reset()

in RequestDataCollector at line 191
getMethod()

in RequestDataCollector at line 196
getPathInfo()

in RequestDataCollector at line 201
getRequestRequest()

in RequestDataCollector at line 206
getRequestQuery()

in RequestDataCollector at line 211
getRequestFiles()

in RequestDataCollector at line 216
getRequestHeaders()

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

Parameters

$raw

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

Parameters

$raw

in RequestDataCollector at line 231
getRequestAttributes()

in RequestDataCollector at line 236
getResponseHeaders()

in RequestDataCollector at line 241
getResponseCookies()

in RequestDataCollector at line 246
getSessionMetadata()

in RequestDataCollector at line 251
getSessionAttributes()

in RequestDataCollector at line 256
getFlashes()

in RequestDataCollector at line 261
getContent()

in RequestDataCollector at line 266
getContentType()

in RequestDataCollector at line 271
getStatusText()

in RequestDataCollector at line 276
getStatusCode()

in RequestDataCollector at line 281
getFormat()

in RequestDataCollector at line 286
getLocale()

in RequestDataCollector at line 291
getDotenvVars()

in RequestDataCollector at line 303
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 308
getIdentifier()

in RequestDataCollector at line 320
array getRouteParams()

Gets the route parameters.

The _route_params request attributes is automatically set by the RouterListener.

Return Value

array The parameters

in RequestDataCollector at line 331
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 342
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 347
getForwardToken()

in RequestDataCollector at line 352
onKernelController(FilterControllerEvent $event)

Parameters

FilterControllerEvent $event

in RequestDataCollector at line 357
onKernelResponse(FilterResponseEvent $event)

Parameters

FilterResponseEvent $event

in RequestDataCollector at line 368
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 379
string getName()

Returns the name of the collector.

Return Value

string The collector name

in RequestDataCollector at line 391
protected array|string parseController(mixed $controller)

Parse a controller.

Parameters

mixed $controller The controller to parse

Return Value

array|string An array of controller data or a simple string