/** * Cargar la configuraciĆ³n desde el archivo * * @param StorageInterface $Storage */ public static function loadConfig(StorageInterface $Storage) { if (Util::checkReload() || gettype(Session::getConfig()) !== 'object' || time() >= Session::getConfigTime() + self::TIMEOUT_REFRESH) { Session::setConfig(self::arrayMapper($Storage)); Session::setConfigTime(time()); } }
/** * Cargar la configuraciĆ³n */ private static function loadConfig() { try { Config::loadConfig(new XmlHandler(XML_CONFIG_FILE)); } catch (\Exception $e) { error_log(Language::t($e->getMessage())); Session::setConfig(new ConfigData()); if (self::getCurrentScript() !== 'config.php') { header('Location: config.php'); } } }