Exemplo n.º 1
0
 /**
  * @param InstalledPackage[] $packagesToRemove
  */
 public function doRemoves(array $packagesToRemove)
 {
     foreach ($packagesToRemove as $remove) {
         $this->eventManager->dispatch(new PackageUnInstallEvent('pre-package-uninstall', $remove));
         $this->unInstallStrategy->unInstall($remove->getInstalledFiles());
         $this->eventManager->dispatch(new PackageUnInstallEvent('post-package-uninstall', $remove));
         $this->installedPackageRepository->remove($remove);
     }
 }
Exemplo n.º 2
0
 /**
  * Deploy all the queued packages
  */
 public function doDeploy()
 {
     $this->sortPackages();
     /** @var Entry $package */
     foreach ($this->packages as $package) {
         $this->eventManager->dispatch(new PackageDeployEvent('pre-package-deploy', $package));
         $package->getDeployStrategy()->deploy();
         $this->eventManager->dispatch(new PackageDeployEvent('post-package-deploy', $package));
     }
 }