public function setCharset($charset) { $this->charset = $charset; $this->setContentType($this->getContentType()); // update charset which is set on content-type return $this; }