Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / console / Tests / Fixtures / FooOptCommand.php
1 <?php
2
3 use Symfony\Component\Console\Command\Command;
4 use Symfony\Component\Console\Input\InputInterface;
5 use Symfony\Component\Console\Input\InputOption;
6 use Symfony\Component\Console\Output\OutputInterface;
7
8 class FooOptCommand extends Command
9 {
10     public $input;
11     public $output;
12
13     protected function configure()
14     {
15         $this
16             ->setName('foo:bar')
17             ->setDescription('The foo:bar command')
18             ->setAliases(array('afoobar'))
19             ->addOption('fooopt', 'fo', InputOption::VALUE_OPTIONAL, 'fooopt description')
20         ;
21     }
22
23     protected function interact(InputInterface $input, OutputInterface $output)
24     {
25         $output->writeln('interact called');
26     }
27
28     protected function execute(InputInterface $input, OutputInterface $output)
29     {
30         $this->input = $input;
31         $this->output = $output;
32
33         $output->writeln('called');
34         $output->writeln($this->input->getOption('fooopt'));
35     }
36 }