本文整理汇总了PHP中Nette\Diagnostics\Debugger::getBlueScreen方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::getBlueScreen方法的具体用法?PHP Debugger::getBlueScreen怎么用?PHP Debugger::getBlueScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nette\Diagnostics\Debugger
的用法示例。
在下文中一共展示了Debugger::getBlueScreen方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateExceptionFile
/**
* generateExceptionFile
* @param Exception $exception
* @return string
*/
private function generateExceptionFile($exception)
{
$hash = md5($exception);
$exceptionFilename = "exception-" . @date('Y-m-d-H-i-s') . "-{$hash}.html";
foreach (new \DirectoryIterator($this->loggerDirectory) as $entry) {
if (strpos($entry, $hash)) {
$exceptionFilename = $entry;
$saved = TRUE;
break;
}
}
$exceptionFilename = $this->loggerDirectory . '/' . $exceptionFilename;
if (empty($saved) && ($logHandle = @fopen($exceptionFilename, 'w'))) {
ob_start();
// double buffer prevents sending HTTP headers in some PHP
ob_start(function ($buffer) use($logHandle) {
fwrite($logHandle, $buffer);
}, 4096);
Debugger::getBlueScreen()->render($exception);
ob_end_flush();
ob_end_clean();
fclose($logHandle);
}
return $exceptionFilename;
}
示例2: initializePanel
public static function initializePanel(Nette\Application\Application $application)
{
Nette\Diagnostics\Debugger::getBlueScreen()->addPanel(function ($e) use($application) {
return $e ? NULL : array('tab' => 'Nette Application', 'panel' => '<h3>Requests</h3>' . Dumper::toHtml($application->getRequests()) . '<h3>Presenter</h3>' . Dumper::toHtml($application->getPresenter()));
});
}
示例3: register
public function register(DibiConnection $connection)
{
Debugger::getBar()->addPanel($this);
Debugger::getBlueScreen()->addPanel(array(__CLASS__, 'renderException'));
$connection->onEvent[] = array($this, 'logEvent');
}
示例4: getDebuggerBlueScreen
/**
* @return Nette\Diagnostics\BlueScreen
*/
private static function getDebuggerBlueScreen()
{
return method_exists('Nette\\Diagnostics\\Debugger', 'getBlueScreen') ? Debugger::getBlueScreen() : Debugger::$blueScreen;
}
示例5: register
public function register(Dibi\Connection $connection)
{
Debugger::getBar()->addPanel($this);
Debugger::getBlueScreen()->addPanel([__CLASS__, 'renderException']);
$connection->onEvent[] = [$this, 'logEvent'];
}
示例6: createLogger
private function createLogger()
{
$reflection = new \ReflectionClass('Tracy\\Logger');
if ($reflection->getConstructor() && $reflection->getConstructor()->getNumberOfParameters() > 0) {
return new Logger(Tracy\Debugger::$logDirectory, Tracy\Debugger::$email, Nette\Diagnostics\Debugger::getBlueScreen());
} else {
return new Logger();
}
}