/**
  * @param PackageInterface $package
  * @return void
  */
 protected function buildPackageClassPathsForLegacyExtension(PackageInterface $package)
 {
     $this->packageClassesPaths[$package->getPackageKey()] = $package->getClassesPath();
     foreach ($package->getPackageReplacementKeys() as $packageToReplace => $_) {
         $this->packageClassesPaths[$packageToReplace] = $package->getClassesPath();
     }
 }
Пример #2
0
 /**
  * Unregisters a package from the list of available packages
  *
  * @param PackageInterface $package The package to be unregistered
  * @return void
  * @throws Exception\InvalidPackageStateException
  */
 public function unregisterPackage(PackageInterface $package)
 {
     $packageKey = $package->getPackageKey();
     if (!$this->isPackageAvailable($packageKey)) {
         throw new Exception\InvalidPackageStateException('Package "' . $packageKey . '" is not registered.', 1338996142);
     }
     $this->unregisterPackageByPackageKey($packageKey);
 }