/** * @param Package $package * @return $this * @throws \Exception */ public function setCorePackage(Package $package) { if ($this->core !== null) { throw new MultipleCoreException(sprintf("You are trying to use multiple magento-core packages: \"%s\" and \"%s\"", $this->core->getName(), $package->getName())); } $this->core = $package; return $this; }
/** * @param Package $package * @param $target * @param StrategyInterface $strategy * @throws \Exception */ public function build(Package $package, $target, StrategyInterface $strategy) { $source = $package->getSource(); $this->checkSourceExists($source); $this->copyUsingStrategy($source, $target, $strategy); }