mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 13:20:12 +02:00
formats: Add getMimeType() function (#1299)
Allows getting the expected MIME type of the format's output. A corresponding MIME_TYPE constant is also defined in FormatAbstract for the format implementations to overwrite.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
* https://validator.w3.org/feed/
|
||||
*/
|
||||
class AtomFormat extends FormatAbstract{
|
||||
const MIME_TYPE = 'application/atom+xml';
|
||||
|
||||
const LIMIT_TITLE = 140;
|
||||
|
||||
public function stringify(){
|
||||
@@ -147,7 +149,7 @@ EOD;
|
||||
|
||||
public function display(){
|
||||
$this
|
||||
->setContentType('application/atom+xml; charset=' . $this->getCharset())
|
||||
->setContentType(self::MIME_TYPE . '; charset=' . $this->getCharset())
|
||||
->callContentType();
|
||||
|
||||
return parent::display();
|
||||
|
Reference in New Issue
Block a user