Symfony\Component\Console\Command\HelpCommand::execute PHP 메소드

execute() 보호된 메소드

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    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());
        }
    }

Usage Example

예제 #1
0
 /**
  * {@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);
 }
All Usage Examples Of Symfony\Component\Console\Command\HelpCommand::execute