DescriptorCommand2.php 932 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Console\Tests\Fixtures;
  11. use Symfony\Component\Console\Command\Command;
  12. use Symfony\Component\Console\Input\InputArgument;
  13. use Symfony\Component\Console\Input\InputOption;
  14. class DescriptorCommand2 extends Command
  15. {
  16. protected function configure()
  17. {
  18. $this
  19. ->setName('descriptor:command2')
  20. ->setDescription('command 2 description')
  21. ->setHelp('command 2 help')
  22. ->addUsage('-o|--option_name <argument_name>')
  23. ->addUsage('<argument_name>')
  24. ->addArgument('argument_name', InputArgument::REQUIRED)
  25. ->addOption('option_name', 'o', InputOption::VALUE_NONE)
  26. ;
  27. }
  28. }