Response: Add contentType attribute

refs #12161
This commit is contained in:
Noah Hilverling 2016-10-14 16:12:47 +02:00
parent 1e09f68ad2
commit 7cf6b860b5
1 changed files with 31 additions and 0 deletions

View File

@ -54,6 +54,13 @@ class Response extends Zend_Controller_Response_Http
*/ */
protected $rerenderLayout = false; protected $rerenderLayout = false;
/**
* Content type of this response
*
* @var string
*/
protected $contentType = 'text/html';
/** /**
* Get the auto-refresh interval * Get the auto-refresh interval
* *
@ -205,6 +212,30 @@ class Response extends Zend_Controller_Response_Http
return $this; return $this;
} }
/**
* Set the content type of this response
*
* @param string $contentType
*
* @return $this
*/
public function setContentType($contentType)
{
$this->contentType = $contentType;
return $this;
}
/**
* Get the content type of this response
*
* @return string
*/
public function getContentType()
{
return $this->contentType;
}
/** /**
* Entry point for HTTP responses in JSON format * Entry point for HTTP responses in JSON format
* *