Пример #1
0
 /**
  * Handles the "package --add" command.
  *
  * @param Args $args The console arguments.
  *
  * @return int The status code.
  */
 public function handleAdd(Args $args)
 {
     $packageName = $args->getArgument('name');
     $installPath = Path::makeAbsolute($args->getArgument('path'), getcwd());
     $installer = $args->getOption('installer');
     $this->packageManager->installPackage($installPath, $packageName, $installer);
     return 0;
 }
Пример #2
0
 /**
  * Handles the "package --install" command.
  *
  * @param Args $args The console arguments.
  *
  * @return int The status code.
  */
 public function handleInstall(Args $args)
 {
     $packageName = $args->getArgument('name');
     $installPath = Path::makeAbsolute($args->getArgument('path'), getcwd());
     $installer = $args->getOption('installer');
     $env = $args->isOptionSet('dev') ? Environment::DEV : Environment::PROD;
     $this->packageManager->installPackage($installPath, $packageName, $installer, $env);
     return 0;
 }