当前位置: 首页>>代码示例>>PHP>>正文


PHP LibraryInstaller::uninstall方法代码示例

本文整理汇总了PHP中Composer\Installer\LibraryInstaller::uninstall方法的典型用法代码示例。如果您正苦于以下问题:PHP LibraryInstaller::uninstall方法的具体用法?PHP LibraryInstaller::uninstall怎么用?PHP LibraryInstaller::uninstall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Composer\Installer\LibraryInstaller的用法示例。


在下文中一共展示了LibraryInstaller::uninstall方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: uninstall

 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $this->initGingerBackend();
     $extra = $package->getExtra();
     $uninstallPluginCommand = new Cqrs\UninstallPluginCommand(array('plugin_name' => $package->getName(), 'plugin_type' => $package->getType(), 'plugin_namespace' => $extra['plugin-namespace'], 'plugin_version' => $package->getVersion()));
     $this->getServiceManager()->get('malocher.cqrs.gate')->getBus()->invokeCommand($uninstallPluginCommand);
     parent::uninstall($repo, $package);
 }
开发者ID:gingerwfms,项目名称:ginger-plugin-installer,代码行数:8,代码来源:GingerInstaller.php

示例2: uninstall

 /**
  * @inheritdoc
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     // uninstall the package the normal composer way
     parent::uninstall($repo, $package);
     // remove the package from yiisoft/extensions.php
     $this->removePackage($package);
     // remove links for Yii.php
     if ($package->getName() == 'yiisoft/yii2-dev') {
         $this->removeBaseYiiFiles();
     }
 }
开发者ID:selenzo,项目名称:bsuir,代码行数:14,代码来源:Installer.php

示例3: uninstall

 /**
  * {@inheritDoc}
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     parent::uninstall($repo, $package);
     $coreInstallPath = $this->getCoreInstallPath($package);
     // make sure we have absolute paths
     $coreInstallPath = realpath('') . '/' . rtrim($coreInstallPath, '/');
     if (is_link($coreInstallPath)) {
         $this->io->write(sprintf('    Removing concrete5 symlink %s - %s', $coreInstallPath, $this->filesystem->unlink($coreInstallPath) ? '<comment>removed</comment>' : '<error>not removed</error>'));
         $this->io->write('');
     }
 }
开发者ID:fabian,项目名称:concrete5-composer-installers,代码行数:14,代码来源:CoreInstaller.php

示例4: uninstall

 /**
  * @param InstalledRepositoryInterface $repo
  * @param PackageInterface             $package
  *
  * @throws FilesystemException
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     if ($package->isDev()) {
         if (!$repo->hasPackage($package)) {
             throw new \InvalidArgumentException('Package is not installed : ' . $package->getPrettyName());
         }
         $this->symlinkInstaller->uninstall($repo, $package);
     } else {
         $this->defaultInstaller->uninstall($repo, $package);
     }
 }
开发者ID:JasLin,项目名称:composer-shared-package-plugin,代码行数:17,代码来源:SharedPackageInstallerSolver.php

示例5: install

 /**
  * {@inheritDoc}
  */
 public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $extra = $package->getExtra();
     if (empty($extra['class'])) {
         throw new \UnexpectedValueException('Error while installing ' . $package->getPrettyName() . ', composer-plugin packages should have a class defined in their extra key to be usable.');
     }
     parent::install($repo, $package);
     try {
         $this->composer->getPluginManager()->registerPackage($package, true);
     } catch (\Exception $e) {
         // Rollback installation
         $this->io->writeError('Plugin installation failed, rolling back');
         parent::uninstall($repo, $package);
         throw $e;
     }
 }
开发者ID:neon64,项目名称:composer,代码行数:19,代码来源:PluginInstaller.php

示例6: uninstall

 /**
  * {@inheritDoc}
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $installedModules = $this->getInstalledModules();
     $filePath = $this->getConfigFilePath();
     // Get package information
     $name = $package->getPrettyName();
     $autoload = $package->getAutoload();
     // Remove the module from the list
     $installedModules = $this->array_remove_object($installedModules, $name, 'name');
     // Remove duplicated entries
     $installedModules = array_unique($installedModules, SORT_REGULAR);
     // Write to file
     $prettyJson = json_encode($installedModules, JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK);
     file_put_contents($filePath, $prettyJson);
     parent::uninstall($repo, $package);
 }
开发者ID:mc388,项目名称:slim-composer-installer,代码行数:19,代码来源:Installer.php

示例7: uninstall

 /**
  * {@inheritDoc}
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     parent::uninstall($repo, $package);
     $downloadPath = $this->getInstallPath($package);
     while (true) {
         if (is_dir($downloadPath)) {
             if (!glob($downloadPath . '/*')) {
                 if (false === @rmdir($downloadPath)) {
                     break;
                 }
             } else {
                 break;
             }
         } else {
             $downloadPath = dirname($downloadPath);
         }
     }
 }
开发者ID:myqee,项目名称:installer,代码行数:21,代码来源:Installer.php

示例8: uninstall

 /**
  * {@inheritdoc}
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     if ($this->isInstallFromSpressRoot() && self::TYPE_PLUGIN === $package->getType()) {
         return;
     }
     parent::uninstall($repo, $package);
 }
开发者ID:spress,项目名称:spress-installer,代码行数:10,代码来源:Installer.php

示例9: uninstall

 /**
  * {@inheritDoc}
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     parent::uninstall($repo, $package);
 }
开发者ID:braf,项目名称:phalcana-installer,代码行数:7,代码来源:Installer.php

示例10: uninstall

 /**
  * {@inheritDoc}
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $this->repository = $repo;
     $this->beforePatches($package, $package->getVersion(), '0');
     if ($repo->hasPackage($package)) {
         $modules = 0;
         foreach ($this->getModulesPaths($package) as $path) {
             $this->uninstallModule($path, $package);
             $modules++;
         }
         if ($modules) {
             $this->io->write('');
         }
     }
     $this->afterPatches($package, $package->getVersion(), '0');
     parent::uninstall($repo, $package);
 }
开发者ID:gridguyz,项目名称:module-installer,代码行数:20,代码来源:ModuleInstaller.php

示例11: uninstall

 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     parent::uninstall($repo, $package);
     $ns = $this->primaryNamespace($package);
     $this->updateConfig($ns, null);
 }
开发者ID:CoreTyson,项目名称:plugin-installer,代码行数:6,代码来源:Installer.php

示例12: uninstall

 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $this->io->write("xpressengine-installer: uninstalling " . $package->getName());
     $extra = $this->composer->getPackage()->getExtra();
     $path = $extra['xpressengine-plugin']['path'];
     $data = json_decode(file_get_contents($path), true);
     if (in_array($package->getName(), $data['xpressengine-plugin']['uninstall'])) {
         parent::uninstall($repo, $package);
         static::$changed['uninstalled'][$package->getName()] = $package->getPrettyVersion();
     } else {
         $this->io->write("xpressengine-installer: skip to uninstall " . $package->getName());
         if ($this->checkDevPlugin($package)) {
             $repo->removePackage($package);
         }
     }
 }
开发者ID:xpressengine,项目名称:xpressengine-composer-installer,代码行数:16,代码来源:XpressengineInstaller.php

示例13: uninstall

 /**
  * Uninstalls a plugin if requested.
  *
  * @param InstalledRepositoryInterface $repo
  * @param PackageInterface $package
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $strPackageName = $package->getName();
     if (self::startsWith($strPackageName, 'qcubed/plugin')) {
         $this->composerPluginUninstall($package);
     }
     parent::uninstall($repo, $package);
 }
开发者ID:spekary,项目名称:composer,代码行数:14,代码来源:Installer.php

示例14: uninstall

 /**
  * Uninstalls a package
  *
  * @access public
  * @param InstalledRepositoryInterface $repo The repository for installed packages
  * @param PackageInterface $package The package to uninstall
  * @return void
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     if (getenv('OPUS_DISABLED')) {
         parent::uninstall($repo, $package);
         return;
     }
     //
     // Return immediately if we have no information relevant to our installer
     //
     if (!$this->checkFrameworkSupport($package)) {
         return;
     }
     $this->loadInstallationMap();
     foreach ($this->installationMap as $path => $packages) {
         if (($key = array_search($package->getName(), $packages)) !== FALSE) {
             unset($this->installationMap[$path][$key]);
         }
     }
     $this->cleanup();
     $this->saveInstallationMap();
     parent::uninstall($repo, $package);
 }
开发者ID:imarc,项目名称:opus,代码行数:30,代码来源:Processor.php

示例15: uninstall

 /**
  * {@inheritDoc}
  */
 public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     parent::uninstall($repo, $package);
     $this->updatePortalAutoloadConfig();
 }
开发者ID:gpilla,项目名称:portal-installer,代码行数:8,代码来源:PortalBundleInstaller.php


注:本文中的Composer\Installer\LibraryInstaller::uninstall方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。