本文整理汇总了PHP中Tracy\Debugger::time方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::time方法的具体用法?PHP Debugger::time怎么用?PHP Debugger::time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracy\Debugger
的用法示例。
在下文中一共展示了Debugger::time方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($options = [], Application $app = null, RepositoryContract $config = null, Dispatcher $dispatcher = null)
{
static::$options = $config !== null ? array_merge($options, $config->get('tracy')) : $options;
TracyDebugger::$time = array_get($_SERVER, 'REQUEST_TIME_FLOAT', microtime(true));
TracyDebugger::$maxDepth = array_get(static::$options, 'maxDepth');
TracyDebugger::$maxLen = array_get(static::$options, 'maxLen');
TracyDebugger::$showLocation = array_get(static::$options, 'showLocation');
TracyDebugger::$strictMode = array_get(static::$options, 'strictMode');
TracyDebugger::$editor = array_get(static::$options, 'editor');
$bar = TracyDebugger::getBar();
foreach (array_get(static::$options, 'panels') as $key => $enabled) {
if ($enabled === true) {
$class = '\\' . __NAMESPACE__ . '\\Panels\\' . ucfirst($key) . 'Panel';
if (class_exists($class) === false) {
$class = $key;
}
$this->panels[$key] = new $class($app, static::$options);
$bar->addPanel($this->panels[$key], $class);
}
}
if ($dispatcher !== null) {
$dispatcher->listen('kernel.handled', function ($request, $response) {
return static::appendDebugbar($request, $response);
});
} else {
TracyDebugger::enable();
}
}
示例2: initializeTracyDebuger
/**
* initializeTracyDebuger.
*
* @method initializeTracyDebuger
*
* @param array $config
*/
protected function initializeTracyDebuger($config)
{
Debugger::$editor = Arr::get($config, 'editor', Debugger::$editor);
Debugger::$maxDepth = Arr::get($config, 'maxDepth', Debugger::$maxDepth);
Debugger::$maxLength = Arr::get($config, 'maxLength', Debugger::$maxLength);
Debugger::$scream = Arr::get($config, 'scream', true);
Debugger::$showLocation = Arr::get($config, 'showLocation', true);
Debugger::$strictMode = Arr::get($config, 'strictMode', true);
Debugger::$time = Arr::get($_SERVER, 'REQUEST_TIME_FLOAT', microtime(true));
Debugger::$editorMapping = Arr::get($config, 'editorMapping', []);
}
示例3: registerDebugger
protected function registerDebugger()
{
$config = $this->app['config']['tracy'];
Debugger::$time = array_get($_SERVER, 'REQUEST_TIME_FLOAT', microtime(true));
Debugger::$maxDepth = array_get($config, 'maxDepth');
Debugger::$maxLen = array_get($config, 'maxLen');
Debugger::$showLocation = array_get($config, 'showLocation');
Debugger::$strictMode = array_get($config, 'strictMode');
Debugger::$editor = array_get($config, 'editor');
$bar = Debugger::getBar();
foreach ($config['panels'] as $key => $enabled) {
if ($enabled === true or $enabled === '1') {
$class = '\\' . __NAMESPACE__ . '\\Panels\\' . ucfirst($key) . 'Panel';
$bar->addPanel(new $class($config, $this->app), $class);
} elseif (is_string($enabled) === true) {
$class = $enabled;
$bar->addPanel(new $class($config, $this->app), $class);
}
}
}