mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 08:37:30 +02:00
[BridgeAbstract] Change Items section
@@ -109,24 +109,18 @@ This function is the place where all the website scrapping and the RSS feed gene
|
|||||||
|
|
||||||
RSS elements collected by this function must be stored in the class variable `items[]`.
|
RSS elements collected by this function must be stored in the class variable `items[]`.
|
||||||
|
|
||||||
Every RSS element is an instance of the `Item` class.
|
Each RSS element is an associative array that may contain arbitrary keys. Depending on the output format a range of keys is defined.
|
||||||
|
|
||||||
## Items
|
## Items
|
||||||
|
|
||||||
The `Item` class is used to store parameter that are collected in the [`collectData`](#the-collectdata-function) function. Following properties are supported by **RSS-Bridge** :
|
The item array is used to store parameter that are collected in the [`collectData`](#the-collectdata-function) function. Following properties are supported by **RSS-Bridge** :
|
||||||
|
|
||||||
```PHP
|
```PHP
|
||||||
$item->uri // URI to reach the subject ("http://...")
|
$item['uri'] // URI to reach the subject ("http://...")
|
||||||
$item->title // Title of the item
|
$item['title'] // Title of the item
|
||||||
$item->timestamp // Timestamp of the item in numeric format (use `strtotime`)
|
$item['timestamp'] // Timestamp of the item in numeric format (use `strtotime`)
|
||||||
$item->author // Name of the author
|
$item['author'] // Name of the author
|
||||||
$item->content // Content in HTML format
|
$item['content'] // Content in HTML format
|
||||||
```
|
|
||||||
|
|
||||||
In order to create a new item you'll have to escape the **I** in **I**tem like this :
|
|
||||||
|
|
||||||
```PHP
|
|
||||||
$item = new \Item();
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Item usage
|
### Item usage
|
||||||
|
Reference in New Issue
Block a user