Example #1
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);
 }
Example #2
0
File: Runner.php Project: 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);
 }
Example #3
0
 protected function _before()
 {
     $this->app = new \Robo\Application('Robo', \Robo\Runner::VERSION);
     $this->app->addCommandsFromClass(self::ROBOFILE);
 }