diff options
Diffstat (limited to 'lib/FormatAbstract.php')
-rw-r--r-- | lib/FormatAbstract.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/FormatAbstract.php b/lib/FormatAbstract.php index 28eb4bbf..9cba0d8c 100644 --- a/lib/FormatAbstract.php +++ b/lib/FormatAbstract.php @@ -6,11 +6,11 @@ abstract class FormatAbstract const MIME_TYPE = 'text/plain'; - protected string $charset = 'UTF-8'; + protected array $feed = []; protected array $items = []; - protected int $lastModified; + protected string $charset = 'UTF-8'; - protected array $feed = []; + protected int $lastModified; abstract public function stringify(); @@ -30,12 +30,11 @@ abstract class FormatAbstract return $this->feed; } - /** - * @param FeedItem[] $items - */ public function setItems(array $items): void { - $this->items = $items; + foreach ($items as $item) { + $this->items[] = FeedItem::fromArray($item); + } } /** |