1 | <?php |
||
28 | class DefaultIO extends Base |
||
29 | { |
||
30 | /** |
||
31 | * @var \Symfony\Component\Console\Input\InputInterface |
||
32 | */ |
||
33 | protected $input; |
||
34 | |||
35 | /** |
||
36 | * @var \Symfony\Component\Console\Output\OutputInterface |
||
37 | */ |
||
38 | protected $output; |
||
39 | |||
40 | /** |
||
41 | * @var \Symfony\Component\Console\Helper\HelperSet |
||
42 | */ |
||
43 | protected $helperSet; |
||
44 | |||
45 | /** |
||
46 | * @var array<int, int> |
||
47 | */ |
||
48 | private $verbosityMap; |
||
49 | |||
50 | /** |
||
51 | * Constructor. |
||
52 | * |
||
53 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
54 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
55 | * @param \Symfony\Component\Console\Helper\HelperSet $helperSet |
||
56 | */ |
||
57 | 11 | public function __construct(InputInterface $input, OutputInterface $output, HelperSet $helperSet = null) |
|
70 | |||
71 | /** |
||
72 | * {@inheritDoc} |
||
73 | */ |
||
74 | 1 | public function isInteractive() |
|
78 | |||
79 | /** |
||
80 | * {@inheritDoc} |
||
81 | */ |
||
82 | 1 | public function isVerbose() |
|
86 | |||
87 | /** |
||
88 | * {@inheritDoc} |
||
89 | */ |
||
90 | 1 | public function isVeryVerbose() |
|
94 | |||
95 | /** |
||
96 | * {@inheritDoc} |
||
97 | */ |
||
98 | 1 | public function isDebug() |
|
102 | |||
103 | /** |
||
104 | * {@inheritDoc} |
||
105 | */ |
||
106 | 1 | public function write($messages, $newline = true, $verbosity = self::NORMAL) |
|
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | 2 | public function writeError($messages, $newline = true, $verbosity = self::NORMAL) |
|
118 | |||
119 | /** |
||
120 | * Write to the appropriate user output. |
||
121 | * |
||
122 | * @param array|string $messages |
||
123 | * @param bool $newline |
||
124 | * @param bool $stderr |
||
125 | * @param int $verbosity |
||
126 | */ |
||
127 | 3 | private function doWrite($messages, $newline, $stderr, $verbosity) |
|
136 | |||
137 | /** |
||
138 | * {@inheritDoc} |
||
139 | */ |
||
140 | 1 | public function ask($question, $default = null) |
|
148 | |||
149 | /** |
||
150 | * {@inheritDoc} |
||
151 | */ |
||
152 | 1 | public function askConfirmation($question, $default = true) |
|
160 | |||
161 | /** |
||
162 | * {@inheritDoc} |
||
163 | */ |
||
164 | 1 | public function askAndValidate($question, $validator, $attempts = null, $default = null) |
|
174 | |||
175 | /** |
||
176 | * Return the output to write to. |
||
177 | * |
||
178 | * @param bool $stdErr |
||
179 | * @return \Symfony\Component\Console\Output\OutputInterface |
||
180 | */ |
||
181 | 5 | private function getOutputToWriteTo($stdErr = false) |
|
189 | } |
||
190 |