Пример #1
0
 /**
  * Initializes the package manager
  *
  * @param \TYPO3\CMS\Core\Core\Bootstrap|\TYPO3\Flow\Core\Bootstrap $bootstrap The current bootstrap; Flow Bootstrap is here by intention to keep the PackageManager valid to the interface
  * @return void
  */
 public function initialize(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $this->bootstrap = $bootstrap;
     $loadedFromCache = FALSE;
     try {
         $this->loadPackageManagerStatesFromCache();
         $loadedFromCache = TRUE;
     } catch (Exception\PackageManagerCacheUnavailableException $exception) {
         $this->loadPackageStates();
         $this->initializePackageObjects();
         $this->initializeCompatibilityLoadedExtArray();
     }
     //@deprecated since 6.2, don't use
     if (!defined('REQUIRED_EXTENSIONS')) {
         // List of extensions required to run the core
         define('REQUIRED_EXTENSIONS', implode(',', $this->requiredPackageKeys));
     }
     $cacheIdentifier = $this->getCacheIdentifier();
     if ($cacheIdentifier === NULL) {
         // Create an artificial cache identifier if the package states file is not available yet
         // in order that the class loader and class alias map can cache anyways.
         $cacheIdentifier = md5(implode('###', array_keys($this->activePackages)));
     }
     $this->classLoader->setCacheIdentifier($cacheIdentifier)->setPackages($this->activePackages);
     foreach ($this->activePackages as $package) {
         /** @var $package Package */
         $package->boot($bootstrap);
     }
     if (!$loadedFromCache) {
         $this->saveToPackageCache();
     }
 }