/** * @param null|string $content * @param null|string $type * @return void */ public function send($content = null, $type = null) { if (!empty($content)) { self::addContent(null, $content); } if (!empty($type)) { parent::setContentType($type); } parent::send(); }
/** * Prepare the content of the response before to send it to client * * @param \Library\HttpFundamental\Response $response * @return void */ public function prepareResponse(Response $response) { $cto = $this->getContentTypeObject(); if (!empty($cto)) { $ctt_type = $cto->getContentType(); } else { $ctt_type = $this->getContentType(); } $response->setContentType($ctt_type); }