public function getContentType() { if ($this->contentType) { return $this->contentType; } throw new NoContentType(get_class($this)); }