W3cubDocs

/Symfony 4.1

TimeDataCollector

class TimeDataCollector extends DataCollector implements LateDataCollectorInterface

TimeDataCollector.

Properties

protected $data from DataCollector
protected $kernel
protected $stopwatch

Methods

serialize() from DataCollector
unserialize($data) from DataCollector
Data cloneVar(mixed $var)

Converts the variable into a serializable Data instance.

from DataCollector
callable[] getCasters() from DataCollector
__construct(KernelInterface $kernel = null, Stopwatch $stopwatch = null)
collect(Request $request, Response $response, Exception $exception = null)

Collects data for the given Request and Response.

reset()

Resets this data collector to its initial state.

lateCollect()

Collects data as late as possible.

setEvents(array $events)

Sets the request events.

array getEvents()

Gets the request events.

float getDuration()

Gets the request elapsed time.

float getInitTime()

Gets the initialization time.

int getStartTime()

Gets the request time.

string getName()

Returns the name of the collector.

Details

serialize()

unserialize($data)

Parameters

$data

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

protected callable[] getCasters()

Return Value

callable[] The casters to add to the cloner

__construct(KernelInterface $kernel = null, Stopwatch $stopwatch = null)

Parameters

KernelInterface $kernel
Stopwatch $stopwatch

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

Collects data for the given Request and Response.

Parameters

Request $request
Response $response
Exception $exception

reset()

Resets this data collector to its initial state.

lateCollect()

Collects data as late as possible.

setEvents(array $events)

Sets the request events.

Parameters

array $events The request events

array getEvents()

Gets the request events.

Return Value

array The request events

float getDuration()

Gets the request elapsed time.

Return Value

float The elapsed time

float getInitTime()

Gets the initialization time.

This is the time spent until the beginning of the request handling.

Return Value

float The elapsed time

int getStartTime()

Gets the request time.

Return Value

int The time

string getName()

Returns the name of the collector.

Return Value

string The collector name

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.html