TestCommand.php 990 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use Symfony\Component\Console\Command\Command;
  3. use Symfony\Component\Console\Input\InputInterface;
  4. use Symfony\Component\Console\Output\OutputInterface;
  5. class TestCommand extends Command
  6. {
  7. protected function configure()
  8. {
  9. $this
  10. ->setName('namespace:name')
  11. ->setAliases(array('name'))
  12. ->setDescription('description')
  13. ->setHelp('help')
  14. ;
  15. }
  16. public function mergeApplicationDefinition()
  17. {
  18. return parent::mergeApplicationDefinition();
  19. }
  20. public function getApplication()
  21. {
  22. return $this->application;
  23. }
  24. protected function execute(InputInterface $input, OutputInterface $output)
  25. {
  26. $output->writeln('execute called');
  27. }
  28. protected function interact(InputInterface $input, OutputInterface $output)
  29. {
  30. $output->writeln('interact called');
  31. }
  32. public function getHelper($name)
  33. {
  34. return parent::getHelper($name);
  35. }
  36. }