1 | <?php declare(strict_types=1); |
||
22 | abstract class StreamDecorator implements DuplexStreamInterface |
||
23 | { |
||
24 | use BetterEmitter; |
||
25 | |||
26 | private $_listeners; |
||
27 | |||
28 | /** |
||
29 | * @var DuplexStreamInterface |
||
30 | */ |
||
31 | protected $decorated = null; |
||
32 | |||
33 | /** |
||
34 | * StreamDecorator constructor. |
||
35 | * @param DuplexStreamInterface $decorated |
||
36 | */ |
||
37 | 19 | public function __construct(DuplexStreamInterface $decorated) |
|
41 | |||
42 | 1 | public function isReadable() |
|
46 | |||
47 | 1 | public function pause() |
|
51 | |||
52 | 1 | public function resume() |
|
56 | |||
57 | 1 | public function pipe(WritableStreamInterface $destination, array $options = array()) |
|
61 | |||
62 | 1 | public function close() |
|
66 | |||
67 | 1 | public function isWritable() |
|
71 | |||
72 | 1 | public function write($data) |
|
76 | |||
77 | 1 | public function end($data = null) |
|
81 | |||
82 | 19 | public function exchangeStream(DuplexStreamInterface $stream) |
|
93 | |||
94 | 6 | private function unsubscribe(DuplexStreamInterface $stream, array $events) |
|
104 | |||
105 | 19 | private function subscribe(DuplexStreamInterface $stream, array $events) |
|
117 | |||
118 | |||
119 | } |
||
120 |