Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Testwork / Output / Printer / Factory / OutputFactory.php
1 <?php
2
3 /*
4  * This file is part of the Behat.
5  * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 namespace Behat\Testwork\Output\Printer\Factory;
12
13 use Symfony\Component\Console\Output\OutputInterface;
14
15 /**
16  * @author Wouter J <wouter@wouterj.nl>
17  * @author Konstantin Kudryashov <ever.zet@gmail.com>
18  */
19 abstract class OutputFactory
20 {
21     const VERBOSITY_NORMAL       = 1;
22     const VERBOSITY_VERBOSE      = 2;
23     const VERBOSITY_VERY_VERBOSE = 3;
24     const VERBOSITY_DEBUG        = 4;
25
26     /**
27      * @var null|string
28      */
29     private $outputPath;
30     /**
31      * @var array
32      */
33     private $outputStyles = array();
34     /**
35      * @var null|Boolean
36      */
37     private $outputDecorated = null;
38     /**
39      * @var integer
40      */
41     private $verbosityLevel = 0;
42
43     /**
44      * Sets output path.
45      *
46      * @param string $path
47      */
48     public function setOutputPath($path)
49     {
50         $this->outputPath = $path;
51     }
52
53     /**
54      * Returns output path.
55      *
56      * @return null|string
57      */
58     public function getOutputPath()
59     {
60         return $this->outputPath;
61     }
62
63     /**
64      * Sets output styles.
65      *
66      * @param array $styles
67      */
68     public function setOutputStyles(array $styles)
69     {
70         $this->outputStyles = $styles;
71     }
72
73     /**
74      * Returns output styles.
75      *
76      * @return array
77      */
78     public function getOutputStyles()
79     {
80         return $this->outputStyles;
81     }
82
83     /**
84      * Forces output to be decorated.
85      *
86      * @param Boolean $decorated
87      */
88     public function setOutputDecorated($decorated)
89     {
90         $this->outputDecorated = $decorated;
91     }
92
93     /**
94      * Returns output decoration status.
95      *
96      * @return null|Boolean
97      */
98     public function isOutputDecorated()
99     {
100         return $this->outputDecorated;
101     }
102
103     /**
104      * Sets output verbosity level.
105      *
106      * @param integer $level
107      */
108     public function setOutputVerbosity($level)
109     {
110         $this->verbosityLevel = intval($level);
111     }
112
113     /**
114      * Returns output verbosity level.
115      *
116      * @return integer
117      */
118     public function getOutputVerbosity()
119     {
120         return $this->verbosityLevel;
121     }
122
123     /**
124      * Returns a new output stream.
125      *
126      * @return OutputInterface
127      */
128     abstract public function createOutput();
129 }