示例#1
0
    throw new \Exception('Miss language path datas');
}
Language::setDatasPath(PATH_LANGUAGE);
$language = Language::getInstance();
if (!defined('LANGUAGE_DEFAULT')) {
    throw new \Exception('Miss language default');
}
$language->setLanguage(LANGUAGE_DEFAULT, true, true);
// Set default template
if (defined('TEMPLATE_DEFAULT')) {
    Template::setTemplate(TEMPLATE_DEFAULT);
}
//Enable debug tools
if (static::getDebug()) {
    $log->setLevel(Logger::DEBUG);
    Autoloader::setDebug(true);
    //Debug error and exeception
    $exc->attach(new Display());
    $err->attach(new Display());
}
// Logger parameters
if (defined('LOGGER_CACHE') && LOGGER_CACHE && !static::getDebug()) {
    $log->setCache(LOGGER_CACHE);
}
if (defined('LOGGER_LEVEL') && !static::getDebug()) {
    $log->setLevel(LOGGER_LEVEL);
}
if (defined('LOGGER_BACKTRACE') && LOGGER_BACKTRACE) {
    $log->setLogBackTrace(LOGGER_BACKTRACE);
}
if (defined('LOGGER_WRITE') && LOGGER_WRITE && !static::getDebug()) {