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


PHP LibraryInstaller::getPackageBasePath方法代码示例

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


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

示例1: getPackageBasePath

 /**
  * @param PackageInterface $package
  *
  * @return string
  */
 public function getPackageBasePath(PackageInterface $package)
 {
     $extra = $package->getExtra();
     print_r($extra);
     // get dependency glue packages
     return parent::getPackageBasePath($package);
 }
开发者ID:assertchris,项目名称:silverstripe-composer-glue-plugin,代码行数:12,代码来源:GluePluginInstaller.php

示例2: getPackageBasePath

 /**
  * {@inheritDoc}
  */
 public function getPackageBasePath(PackageInterface $package)
 {
     if (!$this->isSharedInstallEnabled($package)) {
         return parent::getPackageBasePath($package);
     }
     return $this->getSharedDir() . DIRECTORY_SEPARATOR . $package->getUniqueName();
 }
开发者ID:ngyuki,项目名称:composer-shared-installer,代码行数:10,代码来源:Installer.php

示例3: getPackageBasePath

 /**
  * {@inheritDoc}
  */
 public function getPackageBasePath(PackageInterface $package)
 {
     if (empty($this->drupalLibraryMap[$package->getPrettyName()])) {
         $path = parent::getPackageBasePath($package);
     } else {
         $path = $this->drupalLibrariesPath . $this->drupalLibraryMap[$package->getPrettyName()];
     }
     return $path;
 }
开发者ID:leolandotan,项目名称:drupal-libraries-installer-plugin,代码行数:12,代码来源:DrupalLibraryInstaller.php

示例4: getPackageBasePath

 /**
  * An override to return the correct destination for a package.
  *
  * @param PackageInterface $package
  * @return string
  */
 public function getPackageBasePath(PackageInterface $package)
 {
     $parts = explode('_', $package->getName());
     if ('qcubed/plugin' === $parts[0]) {
         $this->initializeVendorDir();
         return ($this->vendorDir ? $this->vendorDir . '/' : '') . 'qcubed/plugin/' . $parts[1];
     } else {
         return parent::getPackageBasePath($package);
     }
 }
开发者ID:koopa,项目名称:composer,代码行数:16,代码来源:Installer.php

示例5: getPackageBasePath

 /**
  * @param PackageInterface $package
  *
  * @return string
  */
 public function getPackageBasePath(PackageInterface $package)
 {
     $root = $this->composer->getPackage();
     if ($rootPath = $this->getRootPath($root, $package)) {
         return $rootPath . "/" . $package->getName();
     }
     if ($packagePath = $this->getPackagePath($package)) {
         return $packagePath . "/" . $package->getName();
     }
     return parent::getPackageBasePath($package);
 }
开发者ID:typedphp,项目名称:composer-path-plugin,代码行数:16,代码来源:PathPluginInstaller.php

示例6: getPackageBasePath

 /**
  * {@inheritdoc}
  */
 protected function getPackageBasePath(PackageInterface $package)
 {
     switch ($package->getType()) {
         case self::TYPE_MOODLE_SOURCE:
             $basePath = $this->getMoodleDir();
             break;
         default:
             $basePath = parent::getPackageBasePath($package);
     }
     return $basePath;
 }
开发者ID:covex-nn,项目名称:moodle-installer,代码行数:14,代码来源:MoodleInstaller.php

示例7: getPackageBasePath

 /**
  * {@inheritDoc}
  */
 public function getPackageBasePath(PackageInterface $package)
 {
     $packageName = strtolower($package->getName());
     if (isset($this->cached[$packageName])) {
         return $this->cached[$packageName];
     }
     if ($packageName === 'drupal/drupal') {
         $path = $this->drupalRoot;
     } else {
         list($vendor, $name) = explode('/', $packageName);
         $path = '';
         foreach (array('module' => 'drupalModules', 'theme' => 'drupalThemes') as $type => $drupalType) {
             if ($package->getType() === "drupal-{$type}") {
                 $subdir = "project";
                 foreach (array($packageName, "{$vendor}/*") as $key) {
                     if (isset($this->{$drupalType}[$key])) {
                         $subdir = $this->{$drupalType}[$key];
                     }
                 }
                 $path = "{$this->drupalRoot}/sites/all/{$type}s/{$subdir}/{$name}";
             }
         }
         if (!$path) {
             foreach (array($packageName, "{$vendor}/*") as $key) {
                 if (isset($this->drupalLibraries[$key])) {
                     $path = $this->drupalRoot . '/sites/all/libraries/';
                     $path .= empty($this->drupalLibraries[$key]) ? $name : $this->drupalLibraries[$key];
                 }
             }
         }
     }
     if ($path) {
         $this->io->write("Installing <info>{$packageName}</info> in <info>{$path}.</info>");
     } else {
         $path = parent::getPackageBasePath($package);
     }
     $this->cached[$packageName] = $path;
     return $path;
 }
开发者ID:jbrauer,项目名称:drupal-composer-installer,代码行数:42,代码来源:DrupalInstaller.php

示例8: getPackageBasePath

 /**
  * {@inheritDoc}
  */
 protected function getPackageBasePath(PackageInterface $package)
 {
     $this->initializeVendorDir();
     $path = $this->getYiiPackageBasePath($package->getType(), $this->yiiPaths, $this->vendorDir, $package->getName());
     if ($path === false) {
         return parent::getPackageBasePath($package);
     }
     return $path;
 }
开发者ID:mihaildev,项目名称:yiicomposer,代码行数:12,代码来源:Installer.php

示例9: getPackageBasePath

 protected function getPackageBasePath(PackageInterface $package)
 {
     if ($this->_isInUse) {
         // If certains packages are specified to be global
         if (!empty($this->_globalPackages) && !in_array($package->getName(), $this->_globalPackages)) {
             return parent::getPackageBasePath($package);
         }
         $this->initializeGlobalDir();
         $this->initializeVendorDir();
         return $this->_globalDir . '/' . $this->getPackagePath($package);
     } else {
         return parent::getPackageBasePath($package);
     }
 }
开发者ID:itscaro,项目名称:composer-global-installer,代码行数:14,代码来源:GlobalInstaller.php


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