當前位置: 首頁>>代碼示例>>PHP>>正文


PHP LibraryInstaller::removeCode方法代碼示例

本文整理匯總了PHP中Composer\Installer\LibraryInstaller::removeCode方法的典型用法代碼示例。如果您正苦於以下問題:PHP LibraryInstaller::removeCode方法的具體用法?PHP LibraryInstaller::removeCode怎麽用?PHP LibraryInstaller::removeCode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Composer\Installer\LibraryInstaller的用法示例。


在下文中一共展示了LibraryInstaller::removeCode方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: removeCode

 /**
  * {@inheritDoc}
  */
 protected function removeCode(PackageInterface $package)
 {
     $path = $this->getInstallPath($package);
     if ($this->isSymlink($path)) {
         $this->debug("Unlinking <comment>{$path}</comment>...");
         $this->filesystem->unlink($path);
         return true;
     }
     return parent::removeCode($package);
 }
開發者ID:far-blue,項目名稱:dev-linker,代碼行數:13,代碼來源:DevLinker.php

示例2: removeCode

 /**
  * {@inheritDoc}
  */
 protected function removeCode(PackageInterface $package)
 {
     $publicPath = $this->getPublicPath();
     $installPath = $this->getInstallPath($package);
     if (is_link($installPath)) {
         unlink($installPath);
     } else {
         parent::removeCode($package);
     }
     // remove symlink package public folder to keeko's public folder
     $type = $package->getType();
     if ($type !== 'keeko-core') {
         $target = $this->filesystem->normalizePath($publicPath . '/' . $this->getPackageDir($type) . '/' . $package->getName());
         if (is_link($target)) {
             unlink($target);
         }
         // remove parent if empty
         $parent = dirname($target);
         if (file_exists($parent) && count(scandir($parent)) == 2) {
             $this->filesystem->removeDirectoryPhp($parent);
         }
     }
 }
開發者ID:JasLin,項目名稱:composer-installer,代碼行數:26,代碼來源:KeekoComposerInstaller.php

示例3: removeCode

 /**
  * {@inheritDoc}
  */
 protected function removeCode(PackageInterface $package)
 {
     parent::removeCode($package);
     $this->removeLoader($package);
 }
開發者ID:devaloka,項目名稱:mu-plugin-installer,代碼行數:8,代碼來源:MuPluginInstaller.php

示例4: removeCode

 /**
  * {@inheritDoc}
  */
 protected function removeCode(PackageInterface $package)
 {
     if ($this->isLocalSymlink($package)) {
         $this->filesystem->unlink($this->getInstallPath($package));
         return true;
     }
     return parent::removeCode($package);
 }
開發者ID:piwi,項目名稱:composer-symlinker,代碼行數:11,代碼來源:LocalInstaller.php

示例5: removeCode

 /**
  * Remove both the installed code and files from the Component directory.
  *
  * @param PackageInterface $package
  */
 public function removeCode(PackageInterface $package)
 {
     $this->removeComponent($package);
     parent::removeCode($package);
 }
開發者ID:robloach,項目名稱:component-installer,代碼行數:10,代碼來源:Installer.php

示例6: removeCode

 /**
  * {@inheritDoc}
  */
 protected function removeCode(PackageInterface $package)
 {
     if (!$this->isSharedInstallEnabled($package)) {
         parent::removeCode($package);
         return;
     }
 }
開發者ID:ngyuki,項目名稱:composer-shared-installer,代碼行數:10,代碼來源:Installer.php

示例7: removeCode

 /**
  * Remove the code
  *
  * @param PackageInterface $package            
  * @return void
  */
 public function removeCode(PackageInterface $package)
 {
     $this->initializeVendorDir();
     $this->supportedByName($package->getPrettyName());
     $this->setComponentPath();
     if (is_dir($this->getComponentPath()) && basename($this->getComponentPath()) !== 'component') {
         $this->filesystem->removeDirectory($this->getComponentPath());
     } else {
         $this->io->error($this->getComponentPath());
     }
     parent::removeCode($package);
 }
開發者ID:mkungla,項目名稱:aframe-php,代碼行數:18,代碼來源:AframeComponentInstaller.php


注:本文中的Composer\Installer\LibraryInstaller::removeCode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。