| 1 | <?php |
||
| 5 | class Buffer implements WriterInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string $contents The buffered data. |
||
| 9 | */ |
||
| 10 | protected $contents = ""; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Write the content to the buffer. |
||
| 14 | * |
||
| 15 | * @param string $content |
||
| 16 | * |
||
| 17 | * @return void |
||
| 18 | */ |
||
| 19 | 16 | public function write($content) |
|
| 23 | |||
| 24 | |||
| 25 | /** |
||
| 26 | * Get the buffered data. |
||
| 27 | * |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | 16 | public function get() |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Clean the buffer and throw away any data. |
||
| 37 | * |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | 4 | public function clean() |
|
| 44 | } |
||
| 45 |