aboutsummaryrefslogtreecommitdiff
path: root/formats/PlaintextFormat.php
blob: e93c94b5880064c5112229fcef72caca5694c586 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php

class PlaintextFormat extends FormatAbstract
{
    const MIME_TYPE = 'text/plain';

    public function render(): string
    {
        $feed = $this->getFeed();
        foreach ($this->getItems() as $item) {
            $feed['items'][] = $item->toArray();
        }
        $text = print_r($feed, true);
        return $text;
    }
}