/** * This function is triggered whenever there is data to be read. * * @return void */ public function readLines() { $str = $this->buffer->read($this->bufferSize); $this->bufferStr .= $str; $this->flush(); }