예제 #1
0
파일: Service.php 프로젝트: JamieS/phrozn
 /**
  * Remove given bundle from project directory
  *
  * @param string $bundle Bundle name, URI or filename
  *
  * @return \Phrozn\Bundle
  */
 public function clobberBundle($bundle)
 {
     $bundle = new Bundle($bundle, $this->getConfig());
     $bundleId = $bundle->getInfo('id');
     $registry = $this->getRegistryContainer();
     if (false === $registry->isInstalled($bundleId)) {
         throw new \Exception(sprintf('Bundle "%s" is NOT installed.', $bundleId));
     }
     // uninstall
     $bundle->removeFrom($this->getProjectPath());
     // persist list of installed bundles
     $registry->markAsUninstalled($bundleId);
 }