本文整理汇总了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");
}
}
}
示例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;
}
示例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;
}
示例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");
}
示例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";
}
}