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


PHP LibraryInstaller::isInstalled方法代码示例

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


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

示例1: isInstalled

 /**
  * @param InstalledRepositoryInterface $repo
  * @param PackageInterface             $package
  *
  * @return bool
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     if ($package->isDev()) {
         return $this->symlinkInstaller->isInstalled($repo, $package);
     }
     return $this->defaultInstaller->isInstalled($repo, $package);
 }
开发者ID:JasLin,项目名称:composer-shared-package-plugin,代码行数:13,代码来源:SharedPackageInstallerSolver.php

示例2: testIsInstalled

 public function testIsInstalled()
 {
     $library = new LibraryInstaller($this->vendorDir, $this->binDir, $this->dm, $this->repository, $this->io);
     $package = $this->createPackageMock();
     $this->repository->expects($this->exactly(2))->method('hasPackage')->with($package)->will($this->onConsecutiveCalls(true, false));
     $this->assertTrue($library->isInstalled($package));
     $this->assertFalse($library->isInstalled($package));
 }
开发者ID:natxet,项目名称:composer,代码行数:8,代码来源:LibraryInstallerTest.php

示例3: isInstalled

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

示例4: isInstalled

 /**
  * {@inheritDoc}
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     if ($this->alwaysInstall($package)) {
         return false;
     }
     return parent::isInstalled($repo, $package);
 }
开发者ID:azt3k,项目名称:non-destructive-archive-installer,代码行数:10,代码来源:NonDestructiveArchiveInstallerInstaller.php

示例5: isInstalled

 /**
  * {@inheritDoc}
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     if (parent::isInstalled($repo, $package) == false) {
         return false;
     }
     return $repo->hasPackage($package) && $this->isInstalledBinaries($package);
 }
开发者ID:ngyuki,项目名称:composer-shared-installer,代码行数:10,代码来源:Installer.php

示例6: isInstalled

 /**
  * {@inheritDoc}
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $installed = parent::isInstalled($repo, $package);
     if ($installed) {
         foreach ($this->getEntryFileLocations($package) as $entryFile) {
             if (!$this->filesystem->isFile($entryFile)) {
                 $installed = false;
                 break;
             }
         }
     }
     return $installed;
 }
开发者ID:lplabs,项目名称:wordpress-muplugin-installer,代码行数:16,代码来源:WordPressMustUsePluginInstaller.php

示例7: install

 public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     // install files
     if (!parent::isInstalled($repo, $package)) {
         parent::install($repo, $package);
     }
     // parse config xml
     $dir = $this->composer->getConfig()->get('vendor-dir');
     $config = $dir . '/' . $package->getName() . '/config.xml';
     if (is_file($config)) {
         // make service autoloadable
         $classLoader = $this->getClassLoader($package);
         $classLoader->register();
         try {
             // create service
             $hm = $this->container->get('handlerManager');
             $handler = $hm->getHandler('AmunService\\Core\\Service');
             $record = $handler->getRecord();
             if ($package->getInstallationSource() == 'source') {
                 $source = $package->getSourceUrl();
             } else {
                 if ($package->getInstallationSource() == 'dist') {
                     $source = $package->getDistUrl();
                 }
             }
             $record->setSource($source);
             $record->setAutoloadPath($this->getAutoloadPath($package, $config));
             $record->setConfig($config);
             $record->setName($package->getPrettyName());
             $record->setLink($package->getHomepage());
             $record->setLicense(implode(', ', $package->getLicense()));
             $record->setVersion($package->getPrettyVersion());
             $handler->create($record);
         } catch (\Exception $e) {
             $this->container->get('logger')->error($e->getMessage());
         }
         $classLoader->unregister();
     }
 }
开发者ID:visapi,项目名称:amun,代码行数:39,代码来源:ServiceInstaller.php

示例8: isInstalled

 /**
  * {@inheritDoc}
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $loader = $this->getLoaderFileInstallPath($package);
     return parent::isInstalled($repo, $package) || is_readable($loader);
 }
开发者ID:devaloka,项目名称:mu-plugin-installer,代码行数:8,代码来源:MuPluginInstaller.php

示例9: isInstalled

 /**
  * {@inheritDoc}
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $parent = parent::isInstalled($repo, $package);
     if (!$parent) {
         return $parent;
     }
     return file_exists($this->getAssetsInstallPath($package)) && is_readable($this->getAssetsInstallPath($package));
 }
开发者ID:atelierspierrot,项目名称:assets-manager,代码行数:11,代码来源:AssetsInstaller.php

示例10: isInstalled

 /**
  * {@inheritDoc}
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     $installer = $this->_application->getInstaller();
     $installer->setPath('source', $this->getInstallPath($package));
     $manifest = $installer->getManifest();
     $manifestPath = $installer->getPath('manifest');
     if (file_exists($manifestPath) && $manifest) {
         $type = (string) $manifest->attributes()->type;
         $element = $this->_getElementFromManifest($manifest, $manifestPath);
         if (!empty($element)) {
             return $this->_application->hasExtension($element, $type);
         }
     }
     return parent::isInstalled($repo, $package);
 }
开发者ID:oligriffiths,项目名称:nooku-installer,代码行数:18,代码来源:JoomlaExtension.php

示例11: isInstalled

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

示例12: isInstalled

 /**
  * {@inheritdoc}
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     return parent::isInstalled($repo, $package) && is_dir($this->getInstallPath($package) . '/module/Rubedo');
 }
开发者ID:novactive,项目名称:rubedo-core-installer,代码行数:7,代码来源:CoreInstaller.php

示例13: isInstalled

 /**
  * Checks that provided package is installed.
  *
  * @param InstalledRepositoryInterface $repo
  *            repository in which to check
  * @param PackageInterface $package
  *            package instance
  *            
  * @return bool
  */
 public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     return parent::isInstalled($repo, $package) && is_dir($this->getComponentPath());
 }
开发者ID:mkungla,项目名称:aframe-php,代码行数:14,代码来源:AframeComponentInstaller.php


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