mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-01 16:45:02 +02:00
refactor: deprecate FeedItem constructor (#4201)
* fix: bug in prior commit * refactor: deprecate FeedItem constructor * test: fix
This commit is contained in:
parent
2a96bf19b5
commit
6afd13eb06
11 changed files with 78 additions and 114 deletions
|
@ -6,11 +6,11 @@ abstract class FormatAbstract
|
|||
|
||||
const MIME_TYPE = 'text/plain';
|
||||
|
||||
protected string $charset = 'UTF-8';
|
||||
protected array $items = [];
|
||||
protected int $lastModified;
|
||||
|
||||
protected array $feed = [];
|
||||
protected array $items = [];
|
||||
protected string $charset = 'UTF-8';
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue