| @@ 235-241 (lines=7) @@ | ||
| 232 | /** |
|
| 233 | * @todo duplicated code much? |
|
| 234 | */ |
|
| 235 | if (isset($this->options['read_err'])) { |
|
| 236 | $streamName = $this->options['read_err']; |
|
| 237 | $this->$streamName->on('data', function ($data) use ($streamName) { |
|
| 238 | $this->onData($data, $streamName); |
|
| 239 | }); |
|
| 240 | unset($streamName); |
|
| 241 | } |
|
| 242 | ||
| 243 | if (isset($this->options['read'])) { |
|
| 244 | $streamName = $this->options['read']; |
|
| @@ 243-249 (lines=7) @@ | ||
| 240 | unset($streamName); |
|
| 241 | } |
|
| 242 | ||
| 243 | if (isset($this->options['read'])) { |
|
| 244 | $streamName = $this->options['read']; |
|
| 245 | $this->$streamName->on('data', function ($data) use ($streamName) { |
|
| 246 | $this->onData($data, $streamName); |
|
| 247 | }); |
|
| 248 | unset($streamName); |
|
| 249 | } |
|
| 250 | } |
|
| 251 | ||
| 252 | /** |
|