| @@ 280-287 (lines=8) @@ | ||
| 277 | /** |
|
| 278 | * @internal |
|
| 279 | */ |
|
| 280 | protected function handleStart() |
|
| 281 | { |
|
| 282 | if ($this->stream !== null) |
|
| 283 | { |
|
| 284 | $this->stream->on('data', [ $this, 'handleData' ]); |
|
| 285 | $this->stream->on('close', [ $this, 'stop' ]); |
|
| 286 | } |
|
| 287 | } |
|
| 288 | ||
| 289 | /** |
|
| 290 | * @internal |
|
| @@ 292-299 (lines=8) @@ | ||
| 289 | /** |
|
| 290 | * @internal |
|
| 291 | */ |
|
| 292 | protected function handleStop() |
|
| 293 | { |
|
| 294 | if ($this->stream !== null) |
|
| 295 | { |
|
| 296 | $this->stream->removeListener('data', [ $this, 'handleData' ]); |
|
| 297 | $this->stream->removeListener('close', [ $this, 'stop' ]); |
|
| 298 | } |
|
| 299 | } |
|
| 300 | ||
| 301 | /** |
|
| 302 | * @internal |
|