1: <?php
2:
3: namespace React\Stream;
4:
5: use Evenement\EventEmitter;
6:
7: class ReadableStream extends EventEmitter implements ReadableStreamInterface
8: {
9: protected $closed = false;
10:
11: public function isReadable()
12: {
13: return !$this->closed;
14: }
15:
16: public function pause()
17: {
18: }
19:
20: public function resume()
21: {
22: }
23:
24: public function pipe(WritableStreamInterface $dest, array $options = array())
25: {
26: return Util::pipe($this, $dest, $options);
27: }
28:
29: public function close()
30: {
31: if ($this->closed) {
32: return;
33: }
34:
35: $this->closed = true;
36: $this->emit('close');
37: $this->removeAllListeners();
38: }
39: }
40: