本文整理汇总了PHP中ErrorHandler::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP ErrorHandler::initialize方法的具体用法?PHP ErrorHandler::initialize怎么用?PHP ErrorHandler::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErrorHandler
的用法示例。
在下文中一共展示了ErrorHandler::initialize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
public static function initialize()
{
ErrorHandler::initialize();
require 'includes/functions/compatibility.php';
require 'includes/functions/general.php';
require 'includes/functions/html_output.php';
self::setSite();
if (!self::siteExists(self::getSite())) {
trigger_error('Site \'' . self::getSite() . '\' does not exist', E_USER_ERROR);
exit;
}
self::setSiteApplication();
call_user_func(array('osCommerce\\OM\\Core\\Site\\' . self::getSite() . '\\Controller', 'initialize'));
}
示例2: initialize
public static function initialize() {
static::loadConfig();
DateTime::setTimeZone();
ErrorHandler::initialize();
static::setSite();
if ( !static::siteExists(static::getSite()) ) {
trigger_error('Site \'' . static::getSite() . '\' does not exist', E_USER_ERROR);
exit();
}
static::setSiteApplication();
call_user_func(array('osCommerce\\OM\\Core\\Site\\' . static::getSite() . '\\Controller', 'initialize'));
}
示例3: fatalErrorHandle
}
}
//else{
//echo "$message in $file on line $line";
//}
return true;
}
function fatalErrorHandle()
{
if (!$this->handle) {
return;
}
$error = error_get_last();
if ($error && $error['type'] & (E_ERROR | E_USER_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_RECOVERABLE_ERROR)) {
self::errorHandle(E_ERROR, $error['message'], $error['file'], $error['line']);
}
}
static function initialize()
{
self::$errorType = [E_ERROR => 'error', E_WARNING => 'warning', E_PARSE => 'parsing error', E_NOTICE => 'notice', E_CORE_ERROR => 'core error', E_CORE_WARNING => 'core warning', E_COMPILE_ERROR => 'compile error', E_COMPILE_WARNING => 'compile warning', E_USER_ERROR => 'user error', E_USER_WARNING => 'user warning', E_USER_NOTICE => 'user notice', E_STRICT => 'strict standard error', E_RECOVERABLE_ERROR => 'recoverable error', E_DEPRECATED => 'deprecated error', E_USER_DEPRECATED => 'user deprecated error'];
if (defined('E_STRICT')) {
self::$errorType[E_STRICT] = 'runtime notice';
}
}
static function errorType($code)
{
return isset(self::$errorType[$code]) ? self::$errorType[$code] : null;
}
}
ErrorHandler::initialize();