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