本文整理匯總了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();
}
}