diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2026-04-16 09:00:12 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2026-04-16 09:00:12 +0200 |
| commit | e67bdc8973e44cd405b6e6910b14383c4e374725 (patch) | |
| tree | 00abac7c2668474084cb22e40b9775824a9dce27 /phork0.php | |
| download | 965-e67bdc8973e44cd405b6e6910b14383c4e374725.tar.gz 965-e67bdc8973e44cd405b6e6910b14383c4e374725.zip | |
Diffstat (limited to 'phork0.php')
| -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 |
