12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace Symfony\Component\Console\Output;
- class BufferedOutput extends Output
- {
- private string $buffer = '';
-
- public function fetch(): string
- {
- $content = $this->buffer;
- $this->buffer = '';
- return $content;
- }
-
- protected function doWrite(string $message, bool $newline)
- {
- $this->buffer .= $message;
- if ($newline) {
- $this->buffer .= \PHP_EOL;
- }
- }
- }
|