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


PHP PackageInterface::getSourceMirrors方法代码示例

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


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

示例1: getSourceMirrors

 /**
  * {@inheritdoc}
  */
 public function getSourceMirrors()
 {
     return $this->package->getSourceMirrors();
 }
开发者ID:tenside,项目名称:core,代码行数:7,代码来源:VersionedPackage.php

示例2: dump

 public function dump(PackageInterface $package)
 {
     $keys = array('binaries' => 'bin', 'type', 'extra', 'installationSource' => 'installation-source', 'autoload', 'devAutoload' => 'autoload-dev', 'notificationUrl' => 'notification-url', 'includePaths' => 'include-path');
     $data = array();
     $data['name'] = $package->getPrettyName();
     $data['version'] = $package->getPrettyVersion();
     $data['version_normalized'] = $package->getVersion();
     if ($package->getTargetDir()) {
         $data['target-dir'] = $package->getTargetDir();
     }
     if ($package->getSourceType()) {
         $data['source']['type'] = $package->getSourceType();
         $data['source']['url'] = $package->getSourceUrl();
         $data['source']['reference'] = $package->getSourceReference();
         if ($mirrors = $package->getSourceMirrors()) {
             $data['source']['mirrors'] = $mirrors;
         }
     }
     if ($package->getDistType()) {
         $data['dist']['type'] = $package->getDistType();
         $data['dist']['url'] = $package->getDistUrl();
         $data['dist']['reference'] = $package->getDistReference();
         $data['dist']['shasum'] = $package->getDistSha1Checksum();
         if ($mirrors = $package->getDistMirrors()) {
             $data['dist']['mirrors'] = $mirrors;
         }
     }
     if ($package->getArchiveExcludes()) {
         $data['archive']['exclude'] = $package->getArchiveExcludes();
     }
     foreach (BasePackage::$supportedLinkTypes as $type => $opts) {
         if ($links = $package->{'get' . ucfirst($opts['method'])}()) {
             foreach ($links as $link) {
                 $data[$type][$link->getTarget()] = $link->getPrettyConstraint();
             }
             ksort($data[$type]);
         }
     }
     if ($packages = $package->getSuggests()) {
         ksort($packages);
         $data['suggest'] = $packages;
     }
     if ($package->getReleaseDate()) {
         $data['time'] = $package->getReleaseDate()->format('Y-m-d H:i:s');
     }
     $data = $this->dumpValues($package, $keys, $data);
     if ($package instanceof CompletePackageInterface) {
         $keys = array('scripts', 'license', 'authors', 'description', 'homepage', 'keywords', 'repositories', 'support');
         $data = $this->dumpValues($package, $keys, $data);
         if (isset($data['keywords']) && is_array($data['keywords'])) {
             sort($data['keywords']);
         }
     }
     if ($package instanceof RootPackageInterface) {
         $minimumStability = $package->getMinimumStability();
         if ($minimumStability) {
             $data['minimum-stability'] = $minimumStability;
         }
     }
     if (count($package->getTransportOptions()) > 0) {
         $data['transport-options'] = $package->getTransportOptions();
     }
     return $data;
 }
开发者ID:aminembarki,项目名称:composer,代码行数:64,代码来源:ArrayDumper.php

示例3: getSourceMirrors

 public function getSourceMirrors()
 {
     return $this->aliasOf->getSourceMirrors();
 }
开发者ID:neon64,项目名称:composer,代码行数:4,代码来源:AliasPackage.php


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