comparison vendor/symfony/console/Output/NullOutput.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
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\OutputFormatter;
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 /**
28 * {@inheritdoc}
29 */
30 public function setFormatter(OutputFormatterInterface $formatter)
31 {
32 // do nothing
33 }
34
35 /**
36 * {@inheritdoc}
37 */
38 public function getFormatter()
39 {
40 // to comply with the interface we must return a OutputFormatterInterface
41 return new OutputFormatter();
42 }
43
44 /**
45 * {@inheritdoc}
46 */
47 public function setDecorated($decorated)
48 {
49 // do nothing
50 }
51
52 /**
53 * {@inheritdoc}
54 */
55 public function isDecorated()
56 {
57 return false;
58 }
59
60 /**
61 * {@inheritdoc}
62 */
63 public function setVerbosity($level)
64 {
65 // do nothing
66 }
67
68 /**
69 * {@inheritdoc}
70 */
71 public function getVerbosity()
72 {
73 return self::VERBOSITY_QUIET;
74 }
75
76 /**
77 * {@inheritdoc}
78 */
79 public function isQuiet()
80 {
81 return true;
82 }
83
84 /**
85 * {@inheritdoc}
86 */
87 public function isVerbose()
88 {
89 return false;
90 }
91
92 /**
93 * {@inheritdoc}
94 */
95 public function isVeryVerbose()
96 {
97 return false;
98 }
99
100 /**
101 * {@inheritdoc}
102 */
103 public function isDebug()
104 {
105 return false;
106 }
107
108 /**
109 * {@inheritdoc}
110 */
111 public function writeln($messages, $options = self::OUTPUT_NORMAL)
112 {
113 // do nothing
114 }
115
116 /**
117 * {@inheritdoc}
118 */
119 public function write($messages, $newline = false, $options = self::OUTPUT_NORMAL)
120 {
121 // do nothing
122 }
123 }