1 | <?php |
||
29 | class Output extends StreamOutput |
||
30 | { |
||
31 | /** |
||
32 | * @var int |
||
33 | */ |
||
34 | protected $indention = 0; |
||
35 | |||
36 | protected $actualIndention = 0; |
||
37 | |||
38 | protected $lastIndention = null; |
||
39 | |||
40 | /** |
||
41 | * @var bool Whether previous, actually output line had newline ending |
||
42 | */ |
||
43 | protected $previousWasNewLine = true; |
||
44 | |||
45 | protected $outputOnCurrentIndention = false; |
||
46 | |||
47 | /** |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $terminalDimensions; |
||
51 | |||
52 | /** |
||
53 | * Constructor. |
||
54 | * |
||
55 | * @param mixed $stream A stream resource |
||
56 | * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) |
||
57 | * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) |
||
58 | * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) |
||
59 | * |
||
60 | * @throws \InvalidArgumentException When first argument is not a real stream |
||
61 | * |
||
62 | * @api |
||
63 | */ |
||
64 | public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) |
||
72 | |||
73 | /** |
||
74 | * Set terminal dimensions |
||
75 | * |
||
76 | * @param array $terminalDimensions Dimensions |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function setTerminalDimensions($terminalDimensions) |
||
84 | |||
85 | /** |
||
86 | * Increase indention for all following lines |
||
87 | * |
||
88 | * @param int $tabs The tabs |
||
89 | * |
||
90 | * @return void |
||
91 | */ |
||
92 | public function indent($tabs = 1) |
||
96 | |||
97 | /** |
||
98 | * Decrease indention for all following lines |
||
99 | * |
||
100 | * @param int $tabs The tabs |
||
101 | * |
||
102 | * @return void |
||
103 | */ |
||
104 | public function outdent($tabs = 1) |
||
111 | |||
112 | /** |
||
113 | * Get the current indention (this actually indents further/back when required) |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | protected function getIndention() |
||
129 | |||
130 | /** |
||
131 | * Write to output |
||
132 | * |
||
133 | * @param array|string $messages Messages |
||
134 | * @param bool $newline Whether to append a newline |
||
135 | * @param int $type The output type |
||
136 | * |
||
137 | * @return void |
||
138 | */ |
||
139 | public function write($messages, $newline = false, $type = \Symfony\Component\Console\Output\Output::OUTPUT_NORMAL) |
||
166 | |||
167 | |||
168 | } |
||
169 | |||
171 |