/** * 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()); } }
/** * Comprobar si la configuraciĆ³n se ha actualizado * * @return bool */ public static function checkConfigRefresh() { return time() - Session::getConfigTime() <= Config::getConfig()->getRefreshValue(); }