mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 09:35:57 +02:00
core: Add FeedItem class (#940)
Add transformation from legacy items to FeedItems, before transforming items to the desired format. This allows using legacy bridges alongside bridges that return FeedItems. As discussed in #940, instead of throwing exceptions on invalid parameters, add messages to the debug log instead Add support for strings to setTimestamp(). If the provided timestamp is a string, automatically try to parse it using strtotime(). This allows bridges to simply use `$item['timestamp'] = $timestamp;` instead of `$item['timestamp'] = strtotime($timestamp);` Support simple_html_dom_node as input paramter for setURI Support simple_html_dom_node as input parameter for setContent
This commit is contained in:
parent
4095cad9b4
commit
988635dcf3
9 changed files with 583 additions and 66 deletions
|
@ -113,7 +113,7 @@ abstract class FormatAbstract implements FormatInterface {
|
|||
* @param array $items {@inheritdoc}
|
||||
*/
|
||||
public function setItems(array $items){
|
||||
$this->items = array_map(array($this, 'array_trim'), $items);
|
||||
$this->items = $items;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue