class Profiler
Profiler.
__construct(ProfilerStorageInterface $storage, LoggerInterface $logger = null, bool $enable = true) | ||
disable() Disables the profiler. | ||
enable() Enables the profiler. | ||
Profile|false | loadProfileFromResponse(Response $response) Loads the Profile for the given Response. | |
Profile | loadProfile(string $token) Loads the Profile for the given token. | |
bool | saveProfile(Profile $profile) Saves a Profile. | |
purge() Purges all data from the storage. | ||
array | find(string $ip, string $url, string $limit, string $method, string $start, string $end, string $statusCode = null) Finds profiler tokens for the given criteria. | |
Profile|null | collect(Request $request, Response $response, Exception $exception = null) Collects data for the given Response. | |
reset() | ||
array | all() Gets the Collectors associated with this profiler. | |
set(array $collectors = array()) Sets the Collectors associated with this profiler. | ||
add(DataCollectorInterface $collector) Adds a Collector. | ||
bool | has(string $name) Returns true if a Collector for the given name exists. | |
DataCollectorInterface | get(string $name) Gets a Collector by name. |
ProfilerStorageInterface | $storage | |
LoggerInterface | $logger | |
bool | $enable |
Disables the profiler.
Enables the profiler.
Loads the Profile for the given Response.
Response | $response |
Profile|false | A Profile instance |
Loads the Profile for the given token.
string | $token | A token |
Profile | A Profile instance |
Saves a Profile.
Profile | $profile |
bool |
Purges all data from the storage.
Finds profiler tokens for the given criteria.
string | $ip | The IP |
string | $url | The URL |
string | $limit | The maximum number of tokens to return |
string | $method | The request method |
string | $start | The start date to search from |
string | $end | The end date to search to |
string | $statusCode | The request status code |
array | An array of tokens |
http://php.net/manual/en/datetime.formats.php | for the supported date/time formats |
Collects data for the given Response.
Request | $request | |
Response | $response | |
Exception | $exception |
Profile|null | A Profile instance or null if the profiler is disabled |
Gets the Collectors associated with this profiler.
array | An array of collectors |
Sets the Collectors associated with this profiler.
array | $collectors | An array of collectors |
Adds a Collector.
DataCollectorInterface | $collector |
Returns true if a Collector for the given name exists.
string | $name | A collector name |
bool |
Gets a Collector by name.
string | $name | A collector name |
DataCollectorInterface | A DataCollectorInterface instance |
InvalidArgumentException | if the collector does not exist |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/Profiler/Profiler.html