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


PHP Package::getDependencies方法代码示例

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


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

示例1: run

 public function run(array $arguments)
 {
     $json = $this->deps->nearestJson();
     $package = new Package(dirname($json));
     $porcelain = count($arguments) && $arguments[0] == 'porcelain';
     if (!$porcelain) {
         Terminal::info("From {$json}\n\n");
         Terminal::bold("* project name: " . $package->getName() . "\n");
     }
     $dependencies = $package->getDependencies();
     if ($porcelain) {
         echo implode(':', $dependencies) . "\n";
     } else {
         if ($dependencies) {
             Terminal::bold("* dependencies:\n");
             foreach ($dependencies as $dep) {
                 echo "  - {$dep} ";
                 if ($this->deps->hasPackage($dep)) {
                     Terminal::success("(installed)");
                 } else {
                     Terminal::warning("(not installed)");
                 }
                 echo "\n";
             }
         } else {
             Terminal::bold("* no dependencies\n");
         }
     }
 }
开发者ID:Rhoban,项目名称:deps,代码行数:29,代码来源:InfoCommand.php

示例2: run

 public function run(array $arguments)
 {
     if ($arguments) {
         foreach ($arguments as $dep) {
             $this->deps->build($dep);
         }
     } else {
         $json = $this->deps->nearestJson();
         $package = new Package(dirname($json));
         $dependencies = $package->getDependencies();
         foreach ($dependencies as $dep) {
             $this->deps->build($dep);
         }
         $this->deps->build($package->getName());
     }
     return true;
 }
开发者ID:Rhoban,项目名称:deps,代码行数:17,代码来源:BuildCommand.php

示例3: run

 public function run(array $arguments)
 {
     if ($arguments) {
         foreach ($arguments as $dep) {
             $this->deps->install($dep);
         }
     } else {
         $json = $this->deps->nearestJson();
         $package = new Package(dirname($json));
         $dependencies = $package->getDependencies();
         if ($dependencies) {
             foreach ($dependencies as $dep) {
                 $this->deps->install($dep);
             }
         } else {
             Terminal::success("Nothing to do!\n");
         }
     }
     return true;
 }
开发者ID:Rhoban,项目名称:deps,代码行数:20,代码来源:InstallCommand.php

示例4: run

 public function run(array $arguments)
 {
     $flags = "";
     if ($arguments) {
         foreach ($arguments as $dep) {
             if ($this->deps->hasPackage($dep)) {
                 $flags .= $this->cflags($this->deps->getPackage($dep));
             }
         }
     } else {
         $json = $this->deps->nearestJson();
         $package = new Package(dirname($json));
         $dependencies = $package->getDependencies();
         foreach ($dependencies as $dep) {
             if ($this->deps->hasPackage($dep)) {
                 $flags .= $this->cflags($this->deps->getPackage($dep));
             }
         }
     }
     Terminal::write($flags . "\n");
 }
开发者ID:Rhoban,项目名称:deps,代码行数:21,代码来源:CFlagsCommand.php

示例5: run

 public function run(array $arguments)
 {
     $json = $this->deps->nearestJson();
     $package = new Package(dirname($json));
     echo "From {$json}\n\n";
     echo "* project name: " . $package->getName() . "\n";
     $dependencies = $package->getDependencies();
     if ($dependencies) {
         echo "* dependencies:\n";
         foreach ($dependencies as $dep) {
             echo "  - {$dep} ";
             if ($this->deps->hasPackage($dep)) {
                 echo "(installed)";
             } else {
                 echo "(not installed)";
             }
             echo "\n";
         }
     } else {
         echo "* no dependencies\n";
     }
 }
开发者ID:RemiFabre,项目名称:deps,代码行数:22,代码来源:InfoCommand.php


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