當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。