contents = &$contents; } public function addContent($content) { if ($content) { if (!is_string($content)) { throw new \Exception("Can not add non-string content", 1); } $this->contents[] = $content; } } }