public function installDependencies($destination, array $dependencies, $global = false)
    {
        $success = true;
        foreach ($dependencies as $stack => $stackDependencies) {
            $manager = $this->getManager($stack);
            $this->output->writeln(sprintf(
                "Installing <info>%s</info> dependencies with '%s': %s",
                $stack,
                $manager->getCommandName(),
                implode(', ', array_keys($stackDependencies))
            ));
            if (!$manager->isAvailable()) {
                $this->output->writeln(sprintf(
                    "Cannot install <comment>%s</comment> dependencies: '%s' is not installed.",
                    $stack,
                    $manager->getCommandName()
                ));
                if ($manager->getInstallHelp()) {
                    $this->output->writeln($manager->getInstallHelp());
                }
                $success = false;
                continue;
            }
            $path = $destination . '/' . $stack;
            $this->ensureDirectory($path);
            $manager->install($path, $stackDependencies, $global);
        }

        return $success;
    }
public function installDependencies($destination, array $dependencies, $global = false)
    {
        $success = true;
        foreach ($dependencies as $stack => $stackDependencies) {
            $manager = $this->getManager($stack);
            $this->output->writeln(sprintf(
                "Installing <info>%s</info> dependencies with '%s': %s",
                $stack,
                $manager->getCommandName(),
                implode(', ', array_keys($stackDependencies))
            ));
            if (!$manager->isAvailable()) {
                $this->output->writeln(sprintf(
                    "Cannot install <comment>%s</comment> dependencies: '%s' is not installed.",
                    $stack,
                    $manager->getCommandName()
                ));
                if ($manager->getInstallHelp()) {
                    $this->output->writeln($manager->getInstallHelp());
                }
                $success = false;
                continue;
            }
            $path = $destination . '/' . $stack;
            $this->ensureDirectory($path);
            $manager->install($path, $stackDependencies, $global);
        }

        return $success;
    }
public function installDependencies ( $ destination , array $ dependencies , $ global = false ) { $ success = true ; foreach ( $ dependencies as $ stack => $ stackDependencies ) { $ manager = $ this -> getManager ( $ stack ) ; $ this -> output -> writeln ( sprintf ( "Installing <info>%s</info> dependencies with '%s': %s" , $ stack , $ manager -> getCommandName ( ) , implode ( ', ' , array_keys ( $ stackDependencies ) ) ) ) ; if ( ! $ manager -> isAvailable ( ) ) { $ this -> output -> writeln ( sprintf ( "Cannot install <comment>%s</comment> dependencies: '%s' is not installed." , $ stack , $ manager -> getCommandName ( ) ) ) ; if ( $ manager -> getInstallHelp ( ) ) { $ this -> output -> writeln ( $ manager -> getInstallHelp ( ) ) ; } $ success = false ; continue ; } $ path = $ destination . '/' . $ stack ; $ this -> ensureDirectory ( $ path ) ; $ manager -> install ( $ path , $ stackDependencies , $ global ) ; } return $ success ; }
Install dependencies into a directory.

@param string $destination
@param array  $dependencies
@param bool   $global

@throws \Exception If a dependency fails to install.

@return bool
False if a dependency manager is not available; otherwise true.
Install dependencies into a directory .