private function readNextChunk() { $this->chunk .= fread($this->handle, $this->chunkSize); $this->readBytes += $this->chunkSize; if ($this->readBytes >= $this->totalBytes) { $this->readBytes = $this->totalBytes; return false; } return true; }