File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55use Evenement \EventEmitter ;
66
7- class ThroughStream extends EventEmitter implements ReadableStreamInterface, WritableStreamInterface
7+ class ThroughStream extends ReadableStream implements WritableStreamInterface
88{
9- private $ closed = false ;
109 private $ pipeSource ;
1110
1211 public function __construct ()
@@ -38,11 +37,6 @@ public function end($data = null)
3837 $ this ->close ();
3938 }
4039
41- public function isReadable ()
42- {
43- return !$ this ->closed ;
44- }
45-
4640 public function isWritable ()
4741 {
4842 return !$ this ->closed ;
@@ -68,18 +62,7 @@ public function close()
6862 return ;
6963 }
7064
71- $ this -> closed = true ;
65+ parent :: close () ;
7266 $ this ->pipeSource = null ;
73-
74- $ this ->emit ('end ' );
75- $ this ->emit ('close ' );
76- $ this ->removeAllListeners ();
77- }
78-
79- public function pipe (WritableStreamInterface $ dest , array $ options = array ())
80- {
81- Util::pipe ($ this , $ dest , $ options );
82-
83- return $ dest ;
8467 }
8568}
You can’t perform that action at this time.
0 commit comments