Documentation

Profiler
in package
implements ResetInterface

Profiler.

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes and Traits

ResetInterface
Provides a way to reset an object to its initial state.

Table of Contents

$collectors  : array<string|int, DataCollectorInterface>
$enabled  : mixed
$initiallyEnabled  : mixed
$logger  : mixed
$storage  : mixed
__construct()  : mixed
add()  : mixed
Adds a Collector.
all()  : array<string|int, mixed>
Gets the Collectors associated with this profiler.
collect()  : Profile|null
Collects data for the given Response.
disable()  : mixed
Disables the profiler.
enable()  : mixed
Enables the profiler.
find()  : array<string|int, mixed>
Finds profiler tokens for the given criteria.
get()  : DataCollectorInterface
Gets a Collector by name.
has()  : bool
Returns true if a Collector for the given name exists.
loadProfile()  : Profile|null
Loads the Profile for the given token.
loadProfileFromResponse()  : Profile|null
Loads the Profile for the given Response.
purge()  : mixed
Purges all data from the storage.
reset()  : mixed
saveProfile()  : bool
Saves a Profile.
set()  : mixed
Sets the Collectors associated with this profiler.
getTimestamp()  : int|null

Properties

$initiallyEnabled

private mixed $initiallyEnabled = true

Methods

__construct()

public __construct(ProfilerStorageInterface $storage[, LoggerInterface|null $logger = null ][, bool $enable = true ]) : mixed
Parameters
$storage : ProfilerStorageInterface
$logger : LoggerInterface|null = null
$enable : bool = true
Return values
mixed

all()

Gets the Collectors associated with this profiler.

public all() : array<string|int, mixed>
Return values
array<string|int, mixed>

collect()

Collects data for the given Response.

public collect(Request $request, Response $response[, Throwable|null $exception = null ]) : Profile|null
Parameters
$request : Request
$response : Response
$exception : Throwable|null = null
Return values
Profile|null

disable()

Disables the profiler.

public disable() : mixed
Return values
mixed

enable()

Enables the profiler.

public enable() : mixed
Return values
mixed

find()

Finds profiler tokens for the given criteria.

public find(string|null $ip, string|null $url, int|null $limit, string|null $method, string|null $start, string|null $end[, string|null $statusCode = null ]) : array<string|int, mixed>
Parameters
$ip : string|null
$url : string|null
$limit : int|null

The maximum number of tokens to return

$method : string|null
$start : string|null

The start date to search from

$end : string|null

The end date to search to

$statusCode : string|null = null
Tags
see
https://php.net/datetime.formats

for the supported date/time formats

Return values
array<string|int, mixed>

has()

Returns true if a Collector for the given name exists.

public has(string $name) : bool
Parameters
$name : string

A collector name

Return values
bool

loadProfile()

Loads the Profile for the given token.

public loadProfile(string $token) : Profile|null
Parameters
$token : string
Return values
Profile|null

loadProfileFromResponse()

Loads the Profile for the given Response.

public loadProfileFromResponse(Response $response) : Profile|null
Parameters
$response : Response
Return values
Profile|null

purge()

Purges all data from the storage.

public purge() : mixed
Return values
mixed

reset()

public reset() : mixed
Return values
mixed

saveProfile()

Saves a Profile.

public saveProfile(Profile $profile) : bool
Parameters
$profile : Profile
Return values
bool

getTimestamp()

private getTimestamp(string|null $value) : int|null
Parameters
$value : string|null
Return values
int|null

Search results