/**
  * @param  \Illuminate\Console\Command $command
  * @param  array $arguments
  * @return int
  */
 protected function runCommand(Illuminate\Console\Command $command, array $arguments = [])
 {
     $command->setLaravel(app());
     $input = new Symfony\Component\Console\Input\ArrayInput($arguments);
     $input->setInteractive(false);
     return $command->run($input, new Symfony\Component\Console\Output\NullOutput());
 }
Example #2
0
 /**
  * Output a debug message if we have a connected command.
  *
  * @param  string $message
  * @param  array  $data
  * @return void
  */
 protected function debug($message, $data = null)
 {
     // No attached command interface
     if (!$this->command) {
         return;
     }
     // Append debug data if provided
     if ($data) {
         $message .= ' ' . json_encode($data);
     }
     // Send message to command interface
     $this->command->info($message);
 }
 /**
  * Run Command
  *
  * Common method to execute an Artisan command.
  * @param  Illuminate\Console\Command $command Artisan command
  * @return integer
  */
 public function runCommand($command)
 {
     return $command->run(new Symfony\Component\Console\Input\ArrayInput([]), new Symfony\Component\Console\Output\NullOutput());
 }