class RequestDataCollector extends DataCollector implements EventSubscriberInterface

Properties

protected $data from DataCollector
protected $controllers

Methods

serialize()

No description

unserialize($data)

No description

string
varToString(mixed $var)

Converts a PHP variable to a string.

__construct()

No description

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

Collects data for the given Request and Response.

getPathInfo()

No description

getRequestRequest()

No description

getRequestQuery()

No description

getRequestHeaders()

No description

getRequestServer()

No description

getRequestCookies()

No description

getRequestAttributes()

No description

getResponseHeaders()

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.

array
getRouteParams()

Gets the route parameters.

string
getController()

Gets the controller.

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

in DataCollector at line 38
unserialize($data)

Parameters

$data

in DataCollector at line 50
protected string varToString(mixed $var)

Converts a PHP variable to a string.

Parameters

mixed $var A PHP variable

Return Value

string The string representation of the variable

at line 28
__construct()

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

Collects data for the given Request and Response.

Parameters

Request $request
Response $response
Exception $exception

at line 173
getPathInfo()

at line 178
getRequestRequest()

at line 183
getRequestQuery()

at line 188
getRequestHeaders()

at line 193
getRequestServer()

at line 198
getRequestCookies()

at line 203
getRequestAttributes()

at line 208
getResponseHeaders()

at line 213
getSessionMetadata()

at line 218
getSessionAttributes()

at line 223
getFlashes()

at line 228
getContent()

at line 233
getContentType()

at line 238
getStatusText()

at line 243
getStatusCode()

at line 248
getFormat()

at line 253
getLocale()

at line 265
string getRoute()

Gets the route name.

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

Return Value

string The route

at line 277
array getRouteParams()

Gets the route parameters.

The _route_params request attributes is automatically set by the RouterListener.

Return Value

array The parameters

at line 287
string getController()

Gets the controller.

Return Value

string The controller as a string

at line 292
onKernelController(FilterControllerEvent $event)

Parameters

FilterControllerEvent $event

at line 297
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 305
string getName()

Returns the name of the collector.

Return Value

string The collector name