2013-08-11 13:30:41 +02:00
|
|
|
<?php
|
2022-07-01 15:10:30 +02:00
|
|
|
|
2016-09-10 20:41:11 +02:00
|
|
|
class PlaintextFormat extends FormatAbstract
|
|
|
|
{
|
2019-10-31 19:00:12 +01:00
|
|
|
const MIME_TYPE = 'text/plain';
|
|
|
|
|
2024-08-23 17:34:06 +02:00
|
|
|
public function render(): string
|
2016-09-10 20:41:11 +02:00
|
|
|
{
|
2024-01-09 20:18:33 +01:00
|
|
|
$feed = $this->getFeed();
|
2023-09-25 22:32:15 +02:00
|
|
|
foreach ($this->getItems() as $item) {
|
2024-01-09 20:18:33 +01:00
|
|
|
$feed['items'][] = $item->toArray();
|
2018-12-26 22:41:32 +01:00
|
|
|
}
|
2024-01-09 20:18:33 +01:00
|
|
|
$text = print_r($feed, true);
|
2023-09-25 22:32:15 +02:00
|
|
|
return $text;
|
2016-09-10 20:41:11 +02:00
|
|
|
}
|
|
|
|
}
|