本文整理汇总了PHP中Tracy\Helpers::fixStack方法的典型用法代码示例。如果您正苦于以下问题:PHP Helpers::fixStack方法的具体用法?PHP Helpers::fixStack怎么用?PHP Helpers::fixStack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracy\Helpers
的用法示例。
在下文中一共展示了Helpers::fixStack方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fixStack
/**
* render.
*
* @method render
*
* @param \Exception $exception
* @param array $error
*
* @return \Exception
*/
protected function fixStack($exception, $error)
{
if (in_array($error['type'], [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE, E_RECOVERABLE_ERROR, E_USER_ERROR], true) === true) {
return Helpers::fixStack(new ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line']));
}
return $exception;
}
示例2: shutdownHandler
/**
* Shutdown handler to catch fatal errors and execute of the planned activities.
* @return void
* @internal
*/
public static function shutdownHandler()
{
if (self::$done) {
return;
}
$error = error_get_last();
if (in_array($error['type'], [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE, E_RECOVERABLE_ERROR, E_USER_ERROR], TRUE)) {
self::exceptionHandler(Helpers::fixStack(new ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line'])), FALSE);
} elseif (!connection_aborted() && !self::$productionMode && self::isHtmlMode()) {
self::getBar()->render();
}
}
示例3: shutdownHandler
/**
* Shutdown handler to catch fatal errors and execute of the planned activities.
* @return void
* @internal
*/
public static function shutdownHandler()
{
if (!self::$reserved) {
return;
}
$error = error_get_last();
if (in_array($error['type'], [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE, E_RECOVERABLE_ERROR, E_USER_ERROR], TRUE)) {
self::exceptionHandler(Helpers::fixStack(new ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line'])), FALSE);
} elseif (self::$showBar && !self::$productionMode) {
self::$reserved = NULL;
self::removeOutputBuffers(FALSE);
self::getBar()->render();
}
}