Esempio n. 1
0
File: Runner.php Progetto: ak4n/Robo
 public function execute($input = null)
 {
     register_shutdown_function(array($this, 'shutdown'));
     set_error_handler(array($this, 'handleError'));
     Config::setOutput(new ConsoleOutput());
     $input = $this->prepareInput($input ? $input : $_SERVER['argv']);
     $app = new Application('Robo', self::VERSION);
     if (!$this->loadRoboFile()) {
         $this->yell("Robo is not initialized here. Please run `robo init` to create a new RoboFile", 40, 'yellow');
         $app->addInitRoboFileCommand($this->roboFile, $this->roboClass);
         $app->run($input);
         return;
     }
     $app->addCommandsFromClass($this->roboClass, $this->passThroughArgs);
     $app->run($input);
 }
Esempio n. 2
0
 public function execute($input = null)
 {
     register_shutdown_function(array($this, 'shutdown'));
     set_error_handler(array($this, 'handleError'));
     Config::setOutput(new ConsoleOutput());
     $input = $this->prepareInput($input ? $input : $_SERVER['argv']);
     $app = new Application('Robo', self::VERSION);
     $app->addCommandsFromClass($this->roboClass, $this->passThroughArgs);
     $app->run($input);
 }