comparison vendor/symfony/console/Style/OutputStyle.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
12 namespace Symfony\Component\Console\Style; 12 namespace Symfony\Component\Console\Style;
13 13
14 use Symfony\Component\Console\Formatter\OutputFormatterInterface; 14 use Symfony\Component\Console\Formatter\OutputFormatterInterface;
15 use Symfony\Component\Console\Helper\ProgressBar; 15 use Symfony\Component\Console\Helper\ProgressBar;
16 use Symfony\Component\Console\Output\OutputInterface; 16 use Symfony\Component\Console\Output\OutputInterface;
17 use Symfony\Component\Console\Output\ConsoleOutputInterface;
17 18
18 /** 19 /**
19 * Decorates output to add console style guide helpers. 20 * Decorates output to add console style guide helpers.
20 * 21 *
21 * @author Kevin Bond <kevinbond@gmail.com> 22 * @author Kevin Bond <kevinbond@gmail.com>
22 */ 23 */
23 abstract class OutputStyle implements OutputInterface, StyleInterface 24 abstract class OutputStyle implements OutputInterface, StyleInterface
24 { 25 {
25 private $output; 26 private $output;
26 27
27 /**
28 * @param OutputInterface $output
29 */
30 public function __construct(OutputInterface $output) 28 public function __construct(OutputInterface $output)
31 { 29 {
32 $this->output = $output; 30 $this->output = $output;
33 } 31 }
34 32
143 */ 141 */
144 public function isDebug() 142 public function isDebug()
145 { 143 {
146 return $this->output->isDebug(); 144 return $this->output->isDebug();
147 } 145 }
146
147 protected function getErrorOutput()
148 {
149 if (!$this->output instanceof ConsoleOutputInterface) {
150 return $this->output;
151 }
152
153 return $this->output->getErrorOutput();
154 }
148 } 155 }