Beispiel #1
0
 /**
  * Register a native Flow package
  *
  * @param \TYPO3\Flow\Package\PackageInterface $package The Package to be registered
  * @param boolean $sortAndSave allows for not saving packagestates when used in loops etc.
  * @return \TYPO3\Flow\Package\PackageInterface
  * @throws \TYPO3\Flow\Package\Exception\CorruptPackageException
  */
 public function registerPackage(\TYPO3\Flow\Package\PackageInterface $package, $sortAndSave = TRUE)
 {
     $package = parent::registerPackage($package, $sortAndSave);
     if ($package instanceof PackageInterface) {
         foreach ($package->getPackageReplacementKeys() as $packageToReplace => $versionConstraint) {
             $this->packageAliasMap[strtolower($packageToReplace)] = $package->getPackageKey();
         }
     }
     return $package;
 }