1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-05 16:17:28 +02:00

refactor: deprecate FeedItem constructor (#4201)

* fix: bug in prior commit

* refactor: deprecate FeedItem constructor

* test: fix
This commit is contained in:
Dag
2024-08-08 03:43:26 +02:00
committed by GitHub
parent 2a96bf19b5
commit 6afd13eb06
11 changed files with 78 additions and 114 deletions

View File

@@ -12,10 +12,6 @@ class FeedItem
protected ?string $uid = null;
protected array $misc = [];
public function __construct()
{
}
public static function fromArray(array $itemArray): self
{
$item = new self();
@@ -25,6 +21,10 @@ class FeedItem
return $item;
}
private function __construct()
{
}
public function __set($name, $value)
{
switch ($name) {
@@ -89,18 +89,6 @@ class FeedItem
return $this->uri;
}
/**
* Set URI to the full article.
*
* Use {@see FeedItem::getURI()} to get the URI.
*
* _Note_: Removes whitespace from the beginning and end of the URI.
*
* _Remarks_: Uses the attribute "href" or "src" if the provided URI is an
* object of simple_html_dom_node.
*
* @param simple_html_dom_node|object|string $uri URI to the full article.
*/
public function setURI($uri)
{
$this->uri = null; // Clear previous data