4 * This file is part of the Behat.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Testwork\Output\Printer\Factory;
13 use Symfony\Component\Console\Output\OutputInterface;
16 * @author Wouter J <wouter@wouterj.nl>
17 * @author Konstantin Kudryashov <ever.zet@gmail.com>
19 abstract class OutputFactory
21 const VERBOSITY_NORMAL = 1;
22 const VERBOSITY_VERBOSE = 2;
23 const VERBOSITY_VERY_VERBOSE = 3;
24 const VERBOSITY_DEBUG = 4;
33 private $outputStyles = array();
37 private $outputDecorated = null;
41 private $verbosityLevel = 0;
48 public function setOutputPath($path)
50 $this->outputPath = $path;
54 * Returns output path.
58 public function getOutputPath()
60 return $this->outputPath;
66 * @param array $styles
68 public function setOutputStyles(array $styles)
70 $this->outputStyles = $styles;
74 * Returns output styles.
78 public function getOutputStyles()
80 return $this->outputStyles;
84 * Forces output to be decorated.
86 * @param Boolean $decorated
88 public function setOutputDecorated($decorated)
90 $this->outputDecorated = $decorated;
94 * Returns output decoration status.
96 * @return null|Boolean
98 public function isOutputDecorated()
100 return $this->outputDecorated;
104 * Sets output verbosity level.
106 * @param integer $level
108 public function setOutputVerbosity($level)
110 $this->verbosityLevel = intval($level);
114 * Returns output verbosity level.
118 public function getOutputVerbosity()
120 return $this->verbosityLevel;
124 * Returns a new output stream.
126 * @return OutputInterface
128 abstract public function createOutput();