1 | <?php declare(strict_types=1); |
||
22 | abstract class StreamDecorator implements DuplexStreamInterface |
||
23 | { |
||
24 | use BetterEmitter; |
||
25 | |||
26 | private $_redirectors; |
||
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 = null) |
|
43 | |||
44 | 1 | public function isReadable() |
|
48 | |||
49 | 1 | public function pause() |
|
53 | |||
54 | 1 | public function resume() |
|
58 | |||
59 | 1 | public function pipe(WritableStreamInterface $destination, array $options = array()) |
|
63 | |||
64 | 1 | public function close() |
|
68 | |||
69 | 1 | public function isWritable() |
|
73 | |||
74 | 1 | public function write($data) |
|
78 | |||
79 | 1 | public function end($data = null) |
|
83 | |||
84 | 19 | public function exchangeStream(DuplexStreamInterface $stream) |
|
95 | |||
96 | 6 | private function unsubscribe(DuplexStreamInterface $stream, array $events) |
|
106 | |||
107 | 19 | private function subscribe(DuplexStreamInterface $stream, array $events) |
|
119 | |||
120 | |||
121 | } |
||
122 |