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:
@@ -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
|
||||
|
Reference in New Issue
Block a user