public function stream_eof() { if ($this->download !== null) { return $this->pointerOffset >= $this->download->getSize(); } return true; }