| 1 | <?php |
||
| 14 | class HiCommand extends Command { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Configuration |
||
| 18 | * |
||
| 19 | * @return void |
||
| 20 | */ |
||
| 21 | 1 | protected function configure() { |
|
| 22 | 1 | $this->setName( 'hi' ) |
|
| 23 | 1 | ->setDescription( "This command prints 'Hi World!'" ) |
|
| 24 | 1 | ->setDefinition( array( |
|
| 25 | 1 | new InputOption( 'flag', 'f', InputOption::VALUE_NONE, 'Raise a flag' ), |
|
| 26 | 1 | new InputArgument( 'activities', InputArgument::IS_ARRAY, 'Space-separated activities to perform', null ), |
|
| 27 | ) ) |
||
| 28 | 1 | ->setHelp( /** @lang text */ |
|
| 29 | 1 | "The <info>hi</info> command just prints 'Hi World!'" ); |
|
| 30 | 1 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Executes the command |
||
| 34 | * |
||
| 35 | * @param InputInterface $input |
||
| 36 | * @param OutputInterface $output |
||
| 37 | * |
||
| 38 | * @return null|int |
||
| 39 | */ |
||
| 40 | 1 | protected function execute( InputInterface $input, OutputInterface $output ) { |
|
| 45 | } |
||
| 46 |