Esempio n. 1
0
 public function run(InputInterface $input, OutputInterface $output)
 {
     // add the application arguments and options
     $this->mergeApplicationDefinition();
     // bind the input against the command specific arguments/options
     try {
         $input->bind($this->definition);
     } catch (\Exception $e) {
         if (!$this->ignoreValidationErrors) {
             throw $e;
         }
     }
     if ($input->isInteractive()) {
         $this->interact($input, $output);
     }
     $input->validate();
     if ($this->code) {
         return call_user_func($this->code, $input, $output);
     } else {
         return $this->execute($input, $output);
     }
 }