FileAccess Orion

Profiler
in package
implements ResetInterface

Profiler.

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes, Traits and Enums

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 $logger = null ][, bool $enable = true ]) : mixed
Parameters
$storage : ProfilerStorageInterface
$logger : LoggerInterface = 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>

An array of collectors

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 $ip, string $url, string $limit, string $method, string $start, string $end[, string $statusCode = null ]) : array<string|int, mixed>
Parameters
$ip : string

The IP

$url : string

The URL

$limit : string

The maximum number of tokens to return

$method : string

The request method

$start : string

The start date to search from

$end : string

The end date to search to

$statusCode : string = null

The request status code

Tags
see
https://php.net/datetime.formats

for the supported date/time formats

Return values
array<string|int, mixed>

An array of tokens

get()

Gets a Collector by name.

public get(string $name) : DataCollectorInterface
Parameters
$name : string

A collector name

Tags
throws
InvalidArgumentException

if the collector does not exist

Return values
DataCollectorInterface

A DataCollectorInterface instance

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

A token

Return values
Profile|null

A Profile instance

loadProfileFromResponse()

Loads the Profile for the given Response.

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

A Profile instance

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