Exemplo n.º 1
0
 public function run()
 {
     $app = $this->startApp();
     $runner = new \blink\core\console\Application(['name' => 'Blink Command Runner', 'version' => Application::VERSION, 'blink' => $app]);
     foreach ($app->consoleCommands() as $command) {
         if (is_string($command)) {
             $command = ['class' => $command];
         }
         $command['blink'] = $app;
         $runner->add(make($command));
     }
     return $runner->run(new ArgvInput(), new ConsoleOutput());
 }
Exemplo n.º 2
0
 public function handleConsole($input, $output)
 {
     $app = new \blink\core\console\Application(['name' => 'Blink Command Runner', 'version' => self::VERSION, 'blink' => $this]);
     $commands = array_merge($this->commands, ['blink\\console\\ServerCommand']);
     foreach ($commands as $command) {
         $app->add(make(['class' => $command, 'blink' => $this]));
     }
     return $app->run($input, $output);
 }