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


PHP PackageInterface::getPrettyString方法代码示例

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


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

示例1: isSkippable

 /**
  * Tells if a package has to be dumped or not.
  *
  * @param PackageInterface $package The package to be dumped
  *
  * @return bool false if the package has to be dumped.
  */
 public function isSkippable(PackageInterface $package)
 {
     if ('metapackage' === $package->getType()) {
         return true;
     }
     $name = $package->getPrettyString();
     if (true === $this->archiveConfig['skip-dev'] && true === $package->isDev()) {
         $this->output->writeln(sprintf("<info>Skipping '%s' (is dev)</info>", $name));
         return true;
     }
     $names = $package->getNames();
     if ($this->archiveConfig['whitelist'] && !array_intersect($this->archiveConfig['whitelist'], $names)) {
         $this->output->writeln(sprintf("<info>Skipping '%s' (is not in whitelist)</info>", $name));
         return true;
     }
     if ($this->archiveConfig['blacklist'] && array_intersect($this->archiveConfig['blacklist'], $names)) {
         $this->output->writeln(sprintf("<info>Skipping '%s' (is in blacklist)</info>", $name));
         return true;
     }
     return false;
 }
开发者ID:zyfran,项目名称:satis,代码行数:28,代码来源:ArchiveBuilderHelper.php

示例2: getPrettyString

 public function getPrettyString(PackageInterface $sourcePackage)
 {
     return $sourcePackage->getPrettyString() . ' ' . $this->description . ' ' . $this->target . ' ' . $this->constraint->getPrettyString() . '';
 }
开发者ID:itillawarra,项目名称:cmfive,代码行数:4,代码来源:Link.php

示例3: getPrettyString

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

示例4: searchInRequires

 /**
  * Search for dependencies in this package.
  *
  * @param PackageInterface $package  The package to search in.
  * @param string           $type     One of "prod" or "dev".
  * @param array|Link[]     $requires The require links.
  *
  * @return void
  */
 private function searchInRequires(PackageInterface $package, $type, array $requires)
 {
     if (isset($requires[$this->packageName])) {
         $link = $requires[$this->packageName];
         $constraint = $link->getPrettyConstraint();
         $section = $package->getPrettyString();
         $message = sprintf('<comment>%s</comment> %s %s', 'dev' == $type ? 'require-dev' : 'require', $this->packageName, $constraint);
         $this->progress->clear();
         // Hack to get the cursor on the line beginning
         $this->output->write("\n[1A");
         $this->output->writeln($this->formatter->formatSection($section, $message));
         $this->progress->display();
     }
 }
开发者ID:bit3,项目名称:composer-global-depends,代码行数:23,代码来源:DependencyAnalyser.php


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