diff options
| -rw-r--r-- | phork0.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/phork0.php b/phork0.php new file mode 100644 index 0000000..1ddc6f6 --- /dev/null +++ b/phork0.php @@ -0,0 +1,26 @@ +<?php
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\NullOutput;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+
+class MyCommand extends Command
+{
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ $ioV = new SymfonyStyle($input, $output->isVerbose() ? $output : new NullOutput());
+ $this->ioVV = new SymfonyStyle(
+ $input,
+ $output->isVeryVerbose() ? $output : new NullOutput()
+ );
+ $this->ioVVV = new SymfonyStyle($input, $output->isDebug() ? $output : new NullOutput());
+
+ $this->ioV->writeln('message visible with -v only');
+ $this->ioVV->writeln('message visible with -vv only');
+ $this->ioVVV->writeln('message visible with -vvv only');
+ }
+}
\ No newline at end of file |
