TYPO3  7.6
OutputStyle.php
Go to the documentation of this file.
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\Style;
13 
17 
23 abstract class OutputStyle implements OutputInterface, StyleInterface
24 {
25  private $output;
26 
31  {
32  $this->output = $output;
33  }
34 
38  public function newLine($count = 1)
39  {
40  $this->output->write(str_repeat(PHP_EOL, $count));
41  }
42 
48  public function createProgressBar($max = 0)
49  {
50  return new ProgressBar($this->output, $max);
51  }
52 
56  public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL)
57  {
58  $this->output->write($messages, $newline, $type);
59  }
60 
64  public function writeln($messages, $type = self::OUTPUT_NORMAL)
65  {
66  $this->output->writeln($messages, $type);
67  }
68 
72  public function setVerbosity($level)
73  {
74  $this->output->setVerbosity($level);
75  }
76 
80  public function getVerbosity()
81  {
82  return $this->output->getVerbosity();
83  }
84 
88  public function setDecorated($decorated)
89  {
90  $this->output->setDecorated($decorated);
91  }
92 
96  public function isDecorated()
97  {
98  return $this->output->isDecorated();
99  }
100 
104  public function setFormatter(OutputFormatterInterface $formatter)
105  {
106  $this->output->setFormatter($formatter);
107  }
108 
112  public function getFormatter()
113  {
114  return $this->output->getFormatter();
115  }
116 }