| @@ 242-249 (lines=8) @@ | ||
| 239 | /** |
|
| 240 | * @internal |
|
| 241 | */ |
|
| 242 | protected function handleStart() |
|
| 243 | { |
|
| 244 | if ($this->stream !== null) |
|
| 245 | { |
|
| 246 | $this->stream->on('data', [ $this, 'handleData' ]); |
|
| 247 | $this->stream->on('close', [ $this, 'stop' ]); |
|
| 248 | } |
|
| 249 | } |
|
| 250 | ||
| 251 | /** |
|
| 252 | * @internal |
|
| @@ 254-261 (lines=8) @@ | ||
| 251 | /** |
|
| 252 | * @internal |
|
| 253 | */ |
|
| 254 | protected function handleStop() |
|
| 255 | { |
|
| 256 | if ($this->stream !== null) |
|
| 257 | { |
|
| 258 | $this->stream->removeListener('data', [ $this, 'handleData' ]); |
|
| 259 | $this->stream->removeListener('close', [ $this, 'stop' ]); |
|
| 260 | } |
|
| 261 | } |
|
| 262 | ||
| 263 | /** |
|
| 264 | * @internal |
|