@api
- Since
- 100.0.2
Definition at line 17 of file Profiler.php.
◆ _parseConfig()
static _parseConfig |
( |
|
$profilerConfig, |
|
|
|
$baseDir, |
|
|
|
$isAjax |
|
) |
| |
|
staticprotected |
Parses config
- Parameters
-
array | string | $profilerConfig | |
string | $baseDir | |
bool | $isAjax | |
- Returns
- array @SuppressWarnings(PHPMD.NPathComplexity) @SuppressWarnings(PHPMD.UnusedFormalParameter)
Definition at line 355 of file Profiler.php.
359 if (is_scalar($profilerConfig)) {
361 [
'output' => is_numeric($profilerConfig) ?
'html' : $profilerConfig],
367 $driverConfigs = (array)(isset(
$config[
'drivers']) ?
$config[
'drivers'] : []);
368 $driverFactory = isset(
$config[
'driverFactory']) ?
$config[
'driverFactory'] :
new Factory();
369 $tagFilters = (array)(isset(
$config[
'tagFilters']) ?
$config[
'tagFilters'] : []);
373 'driverFactory' => $driverFactory,
374 'tagFilters' => $tagFilters,
375 'baseDir' =>
$config[
'baseDir'],
static _parseDriverConfigs(array $driverConfigs, $baseDir)
◆ _parseDriverConfig()
static _parseDriverConfig |
( |
|
$driverConfig | ) |
|
|
staticprotected |
Parses driver config
- Parameters
-
- Returns
- array|false
Definition at line 412 of file Profiler.php.
415 if (is_array($driverConfig)) {
417 }
elseif (is_scalar($driverConfig) && $driverConfig) {
418 if (is_numeric($driverConfig)) {
421 $result = [
'type' => $driverConfig];
elseif(isset( $params[ 'redirect_parent']))
◆ _parseDriverConfigs()
static _parseDriverConfigs |
( |
array |
$driverConfigs, |
|
|
|
$baseDir |
|
) |
| |
|
staticprotected |
Parses list of driver configurations
- Parameters
-
array | $driverConfigs | |
string | $baseDir | |
- Returns
- array
Definition at line 387 of file Profiler.php.
390 foreach ($driverConfigs as
$code => $driverConfig) {
392 if ($driverConfig ===
false) {
395 if (!isset($driverConfig[
'type']) && !is_numeric(
$code)) {
396 $driverConfig[
'type'] =
$code;
398 if (!isset($driverConfig[
'baseDir']) &&
$baseDir) {
399 $driverConfig[
'baseDir'] =
$baseDir;
static _parseDriverConfig($driverConfig)
◆ add()
Add profiler driver.
- Parameters
-
- Returns
- void
Definition at line 137 of file Profiler.php.
139 self::$_drivers[] = $driver;
◆ addTagFilter()
static addTagFilter |
( |
|
$tagName, |
|
|
|
$tagValue |
|
) |
| |
|
static |
Add tag filter.
- Parameters
-
string | $tagName | |
string | $tagValue | |
- Returns
- void
Definition at line 98 of file Profiler.php.
100 if (!isset(self::$_tagFilters[$tagName])) {
101 self::$_tagFilters[$tagName] = [];
103 self::$_tagFilters[$tagName][] = $tagValue;
104 self::$_hasTagFilters =
true;
◆ applyConfig()
static applyConfig |
( |
|
$config, |
|
|
|
$baseDir, |
|
|
|
$isAjax = false |
|
) |
| |
|
static |
Init profiler
- Parameters
-
array | string | $config | |
string | $baseDir | |
bool | $isAjax | |
- Returns
- void
Definition at line 332 of file Profiler.php.
335 if (
$config[
'driverConfigs']) {
336 foreach (
$config[
'driverConfigs'] as $driverConfig) {
340 foreach (
$config[
'tagFilters'] as $tagName => $tagValue) {
static add(DriverInterface $driver)
static _parseConfig($profilerConfig, $baseDir, $isAjax)
static addTagFilter($tagName, $tagValue)
◆ disable()
Disable profiling.
Any call to profiler is silently ignored while profiler is disabled.
- Returns
- void
Definition at line 194 of file Profiler.php.
196 self::$_enabled =
false;
◆ enable()
Enable profiling.
Any call to profiler does nothing until profiler is enabled.
- Returns
- void
Definition at line 182 of file Profiler.php.
184 self::$_enabled =
true;
◆ isEnabled()
Get profiler enable status.
- Returns
- bool
Definition at line 204 of file Profiler.php.
206 return self::$_enabled;
◆ reset()
Reset profiler to initial state
- Returns
- void
Definition at line 233 of file Profiler.php.
236 self::$_enabled =
false;
237 self::$_currentPath = [];
238 self::$_tagFilters = [];
239 self::$_defaultTags = [];
240 self::$_hasTagFilters =
false;
241 self::$_drivers = [];
242 self::$_pathCount = 0;
243 self::$_pathIndex = [];
◆ setDefaultTags()
static setDefaultTags |
( |
array |
$tags | ) |
|
|
static |
Set default tags
- Parameters
-
- Returns
- void
Definition at line 86 of file Profiler.php.
88 self::$_defaultTags = $tags;
◆ NESTING_SEPARATOR
const NESTING_SEPARATOR = '->' |
Separator literal to assemble timer identifier from timer names
Definition at line 22 of file Profiler.php.
The documentation for this class was generated from the following file: