protected function execute(InputInterface $input, OutputInterface $output) { if (null === $this->command) { $this->command = $this->getApplication()->get($input->getArgument('command_name')); } if ($input->getOption('xml')) { $output->writeln($this->command->asXml(), OutputInterface::OUTPUT_RAW); } else { $output->writeln($this->command->asText()); } }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { if (null === $this->command) { $this->command = $this->getApplication()->find($input->getArgument('command_name')); } $this->updateCommandDefinition($this->command, $output); parent::execute($input, $output); }