Exemplo n.º 1
0
 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'));
 }
Exemplo n.º 2
0
    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'));
    }
Exemplo n.º 3
0
            }
        }
        //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();