BufferedOutput.php
2 years ago
ConsoleOutput.php
2 years ago
ConsoleOutputInterface.php
2 years ago
ConsoleSectionOutput.php
2 years ago
NullOutput.php
2 years ago
Output.php
2 years ago
OutputInterface.php
2 years ago
StreamOutput.php
2 years ago
TrimmedBufferOutput.php
2 years ago
NullOutput.php
116 lines
| 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 | namespace IAWP_SCOPED\Symfony\Component\Console\Output; |
| 12 | |
| 13 | use IAWP_SCOPED\Symfony\Component\Console\Formatter\NullOutputFormatter; |
| 14 | use IAWP_SCOPED\Symfony\Component\Console\Formatter\OutputFormatterInterface; |
| 15 | /** |
| 16 | * NullOutput suppresses all output. |
| 17 | * |
| 18 | * $output = new NullOutput(); |
| 19 | * |
| 20 | * @author Fabien Potencier <fabien@symfony.com> |
| 21 | * @author Tobias Schultze <http://tobion.de> |
| 22 | * @internal |
| 23 | */ |
| 24 | class NullOutput implements OutputInterface |
| 25 | { |
| 26 | private $formatter; |
| 27 | /** |
| 28 | * {@inheritdoc} |
| 29 | */ |
| 30 | public function setFormatter(OutputFormatterInterface $formatter) |
| 31 | { |
| 32 | // do nothing |
| 33 | } |
| 34 | /** |
| 35 | * {@inheritdoc} |
| 36 | */ |
| 37 | public function getFormatter() |
| 38 | { |
| 39 | if ($this->formatter) { |
| 40 | return $this->formatter; |
| 41 | } |
| 42 | // to comply with the interface we must return a OutputFormatterInterface |
| 43 | return $this->formatter = new NullOutputFormatter(); |
| 44 | } |
| 45 | /** |
| 46 | * {@inheritdoc} |
| 47 | */ |
| 48 | public function setDecorated(bool $decorated) |
| 49 | { |
| 50 | // do nothing |
| 51 | } |
| 52 | /** |
| 53 | * {@inheritdoc} |
| 54 | */ |
| 55 | public function isDecorated() |
| 56 | { |
| 57 | return \false; |
| 58 | } |
| 59 | /** |
| 60 | * {@inheritdoc} |
| 61 | */ |
| 62 | public function setVerbosity(int $level) |
| 63 | { |
| 64 | // do nothing |
| 65 | } |
| 66 | /** |
| 67 | * {@inheritdoc} |
| 68 | */ |
| 69 | public function getVerbosity() |
| 70 | { |
| 71 | return self::VERBOSITY_QUIET; |
| 72 | } |
| 73 | /** |
| 74 | * {@inheritdoc} |
| 75 | */ |
| 76 | public function isQuiet() |
| 77 | { |
| 78 | return \true; |
| 79 | } |
| 80 | /** |
| 81 | * {@inheritdoc} |
| 82 | */ |
| 83 | public function isVerbose() |
| 84 | { |
| 85 | return \false; |
| 86 | } |
| 87 | /** |
| 88 | * {@inheritdoc} |
| 89 | */ |
| 90 | public function isVeryVerbose() |
| 91 | { |
| 92 | return \false; |
| 93 | } |
| 94 | /** |
| 95 | * {@inheritdoc} |
| 96 | */ |
| 97 | public function isDebug() |
| 98 | { |
| 99 | return \false; |
| 100 | } |
| 101 | /** |
| 102 | * {@inheritdoc} |
| 103 | */ |
| 104 | public function writeln($messages, int $options = self::OUTPUT_NORMAL) |
| 105 | { |
| 106 | // do nothing |
| 107 | } |
| 108 | /** |
| 109 | * {@inheritdoc} |
| 110 | */ |
| 111 | public function write($messages, bool $newline = \false, int $options = self::OUTPUT_NORMAL) |
| 112 | { |
| 113 | // do nothing |
| 114 | } |
| 115 | } |
| 116 |