public function getContent() { if ($this->content === null) { fseek($this->stream, 0); while (($buf = $this->read()) !== false) { $this->content .= $buf; } } return $this->content; }