/** * @param string $configFile name of the ini file to configure the framework * @param boolean $enableErrorHandler enable the error handler of jelix. * keep it to true, unless you have something to debug * and really have to use the default handler or an other handler */ function __construct($configFile, $enableErrorHandler = true) { global $gJCoord, $gJConfig; // temporary init. Remove this line when JELIX_APP_* support will be removed completely from Jelix jApp::initLegacy(); $gJCoord = $this; if ($enableErrorHandler) { set_error_handler('jErrorHandler'); set_exception_handler('JExceptionHandler'); } // load configuration data $gJConfig = jConfig::load($configFile); date_default_timezone_set($gJConfig->timeZone); $this->_loadPlugins(); }
/** * @param string $configFile name of the ini file to configure the framework */ function __construct($configFile) { global $gJCoord, $gJConfig; $gJCoord = $this; // load configuration data $gJConfig = jConfig::load($configFile); // set Error and exception handler // ne devrait être désactivé que lors de certains tests de jelix if ($gJConfig->use_error_handler) { set_error_handler('jErrorHandler'); set_exception_handler('JExceptionHandler'); } date_default_timezone_set($gJConfig->timeZone); $this->_loadPlugins(); }
/** * Load the configuration from the given file. * * Call it after initPaths * @param string|object $configFile name of the ini file to configure the framework or a configuration object * @param boolean $enableErrorHandler enable the error handler of jelix. * keep it to true, unless you have something to debug * and really have to use the default handler or an other handler */ public static function loadConfig($configFile, $enableErrorHandler = true) { if ($enableErrorHandler) { jBasicErrorHandler::register(); } if (is_object($configFile)) { self::setConfig($configFile); } else { self::setConfig(jConfig::load($configFile)); } self::$_config->enableErrorHandler = $enableErrorHandler; }
function jxs_init_jelix_env() { global $gJConfig; if (!$gJConfig) { $gJConfig = jConfig::load(JELIXS_APP_CONFIG_FILE); } }