public function setContent($content) { if (!is_string($content)) { throw new ResponseException('Response content must be a string.'); } $this->content = $content; return $this; }