| 1 | <?php declare(strict_types=1); |
||
| 8 | final class WritableStreamBase64Encode implements WritableStreamInterface |
||
| 9 | { |
||
| 10 | use EventEmitterTrait; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var WritableStreamInterface |
||
| 14 | */ |
||
| 15 | private $stream; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $buffer = ''; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * WritableStreamHash constructor. |
||
| 24 | * @param WritableStreamInterface $stream |
||
| 25 | */ |
||
| 26 | 12 | public function __construct(WritableStreamInterface $stream) |
|
| 30 | |||
| 31 | public function isWritable() |
||
| 35 | |||
| 36 | 11 | public function write($data) |
|
| 42 | |||
| 43 | 12 | public function end($data = null) |
|
| 51 | |||
| 52 | public function close() |
||
| 56 | |||
| 57 | 12 | private function processBuffer(): string |
|
| 65 | } |
||
| 66 |