/** * @return array */ public function getCache() { if ($this->cache->contains(self::CACHE_ID) === true) { return $this->cache->fetch(self::CACHE_ID); } return []; }
/** * @return array */ public function getModulesInfoCache() { if ($this->cache->contains($this->getCacheKey()) === false) { $this->saveModulesInfoCache(); } return $this->cache->fetch($this->getCacheKey()); }
/** * 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'); }
/** * 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] : []; }