Beispiel #1
0
 /**
  * @return array
  */
 public function getCache()
 {
     if ($this->cache->contains(self::CACHE_ID) === true) {
         return $this->cache->fetch(self::CACHE_ID);
     }
     return [];
 }
Beispiel #2
0
 /**
  * @return array
  */
 public function getModulesInfoCache()
 {
     if ($this->cache->contains($this->getCacheKey()) === false) {
         $this->saveModulesInfoCache();
     }
     return $this->cache->fetch($this->getCacheKey());
 }
Beispiel #3
0
 /**
  * Gets the cache for all registered languages
  *
  * @return array
  */
 public function getLanguagePacksCache()
 {
     if ($this->cache->contains('language_packs') === false) {
         $this->saveLanguagePacksCache();
     }
     return $this->cache->fetch('language_packs');
 }
Beispiel #4
0
 /**
  * Returns the module's settings from the cache
  *
  * @param string $module
  * @return array
  */
 public function getSettings($module)
 {
     if ($this->settings === []) {
         if ($this->coreCache->contains(static::CACHE_ID) === false) {
             $this->saveCache();
         }
         $this->settings = $this->coreCache->fetch(static::CACHE_ID);
     }
     return isset($this->settings[$module]) ? $this->settings[$module] : [];
 }