/** * Attempts to load the package manager states from cache * * @throws Exception\PackageManagerCacheUnavailableException */ protected function loadPackageManagerStatesFromCache() { $cacheEntryIdentifier = $this->getCacheEntryIdentifier(); if ($cacheEntryIdentifier === null || !$this->coreCache->has($cacheEntryIdentifier) || !($packageCache = $this->coreCache->requireOnce($cacheEntryIdentifier))) { throw new Exception\PackageManagerCacheUnavailableException('The package state cache could not be loaded.', 1393883342); } $this->packageStatesConfiguration = $packageCache['packageStatesConfiguration']; $this->packageAliasMap = $packageCache['packageAliasMap']; $this->composerNameToPackageKeyMap = $packageCache['composerNameToPackageKeyMap']; $GLOBALS['TYPO3_LOADED_EXT'] = $packageCache['loadedExtArray']; $GLOBALS['TYPO3_currentPackageManager'] = $this; // Strip off PHP Tags from Php Cache Frontend $packageObjects = substr(substr($this->coreCache->get($packageCache['packageObjectsCacheEntryIdentifier']), 6), 0, -2); $this->packages = unserialize($packageObjects); foreach ($packageCache['activePackageKeys'] as $activePackageKey) { $this->activePackages[$activePackageKey] = $this->packages[$activePackageKey]; } unset($GLOBALS['TYPO3_currentPackageManager']); }
/** * @param string $identifier * @return boolean */ public function has($identifier) { $identifier = $this->sanitizeIdentifier($identifier); return $this->templateCache->has($identifier); }