| 1 | <?php |
||
| 11 | class ConsoleOutputStub extends ConsoleOutput implements OutputInterface |
||
| 12 | { |
||
| 13 | protected $outputBuffer; |
||
| 14 | |||
| 15 | public function __construct() |
||
| 16 | { |
||
| 17 | $this->outputBuffer = ''; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param array|string $messages |
||
| 22 | * @param int $type |
||
| 23 | */ |
||
| 24 | public function writeln($messages, $type = self::OUTPUT_NORMAL) |
||
| 25 | { |
||
| 26 | $this->outputBuffer .= $messages . "\n"; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param array|string $messages |
||
| 31 | * @param bool $newline |
||
| 32 | * @param int $type |
||
| 33 | */ |
||
| 34 | public function write($messages, $newline = false, $type = 0) |
||
| 35 | { |
||
| 36 | $this->outputBuffer .= $messages; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function getOutput() |
||
| 43 | { |
||
| 44 | return $this->outputBuffer; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |