diff options
Diffstat (limited to 'vendor/symfony/console/Output/NullOutput.php')
-rw-r--r-- | vendor/symfony/console/Output/NullOutput.php | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/vendor/symfony/console/Output/NullOutput.php b/vendor/symfony/console/Output/NullOutput.php new file mode 100644 index 0000000..40ae332 --- /dev/null +++ b/vendor/symfony/console/Output/NullOutput.php | |||
@@ -0,0 +1,89 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Console\Output; | ||
13 | |||
14 | use Symfony\Component\Console\Formatter\NullOutputFormatter; | ||
15 | use Symfony\Component\Console\Formatter\OutputFormatterInterface; | ||
16 | |||
17 | /** | ||
18 | * NullOutput suppresses all output. | ||
19 | * | ||
20 | * $output = new NullOutput(); | ||
21 | * | ||
22 | * @author Fabien Potencier <fabien@symfony.com> | ||
23 | * @author Tobias Schultze <http://tobion.de> | ||
24 | */ | ||
25 | class NullOutput implements OutputInterface | ||
26 | { | ||
27 | private NullOutputFormatter $formatter; | ||
28 | |||
29 | public function setFormatter(OutputFormatterInterface $formatter): void | ||
30 | { | ||
31 | // do nothing | ||
32 | } | ||
33 | |||
34 | public function getFormatter(): OutputFormatterInterface | ||
35 | { | ||
36 | // to comply with the interface we must return a OutputFormatterInterface | ||
37 | return $this->formatter ??= new NullOutputFormatter(); | ||
38 | } | ||
39 | |||
40 | public function setDecorated(bool $decorated): void | ||
41 | { | ||
42 | // do nothing | ||
43 | } | ||
44 | |||
45 | public function isDecorated(): bool | ||
46 | { | ||
47 | return false; | ||
48 | } | ||
49 | |||
50 | public function setVerbosity(int $level): void | ||
51 | { | ||
52 | // do nothing | ||
53 | } | ||
54 | |||
55 | public function getVerbosity(): int | ||
56 | { | ||
57 | return self::VERBOSITY_QUIET; | ||
58 | } | ||
59 | |||
60 | public function isQuiet(): bool | ||
61 | { | ||
62 | return true; | ||
63 | } | ||
64 | |||
65 | public function isVerbose(): bool | ||
66 | { | ||
67 | return false; | ||
68 | } | ||
69 | |||
70 | public function isVeryVerbose(): bool | ||
71 | { | ||
72 | return false; | ||
73 | } | ||
74 | |||
75 | public function isDebug(): bool | ||
76 | { | ||
77 | return false; | ||
78 | } | ||
79 | |||
80 | public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL): void | ||
81 | { | ||
82 | // do nothing | ||
83 | } | ||
84 | |||
85 | public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL): void | ||
86 | { | ||
87 | // do nothing | ||
88 | } | ||
89 | } | ||