diff options
Diffstat (limited to 'lib/FormatAbstract.php')
-rw-r--r-- | lib/FormatAbstract.php | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/FormatAbstract.php b/lib/FormatAbstract.php index cbc7dc97..5514b0b5 100644 --- a/lib/FormatAbstract.php +++ b/lib/FormatAbstract.php @@ -24,9 +24,6 @@ abstract class FormatAbstract implements FormatInterface { /** MIME type of format output */ const MIME_TYPE = 'text/plain'; - /** @var string|null $contentType The content type */ - protected $contentType = null; - /** @var string $charset The charset */ protected $charset; @@ -66,18 +63,6 @@ abstract class FormatAbstract implements FormatInterface { } /** - * Set the content type - * - * @param string $contentType The content type - * @return self The format object - */ - protected function setContentType($contentType){ - $this->contentType = $contentType; - - return $this; - } - - /** * Set the last modified time * * @param int $lastModified The last modified time @@ -88,34 +73,6 @@ abstract class FormatAbstract implements FormatInterface { } /** - * Send header with the currently specified content type - * - * @throws \LogicException if the content type is not set - * @throws \LogicException if the content type is not a string - * - * @return void - */ - protected function callContentType(){ - if(empty($this->contentType)) - throw new \LogicException('Content-Type is not set!'); - - if(!is_string($this->contentType)) - throw new \LogicException('Content-Type must be a string!'); - - header('Content-Type: ' . $this->contentType); - } - - /** {@inheritdoc} */ - public function display(){ - if ($this->lastModified) { - header('Last-Modified: ' . gmdate('D, d M Y H:i:s ', $this->lastModified) . 'GMT'); - } - echo $this->stringify(); - - return $this; - } - - /** * {@inheritdoc} * * @param array $items {@inheritdoc} |