mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 08:07:33 +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[]`.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
$item->uri // URI to reach the subject ("http://...")
|
||||
$item->title // Title of the item
|
||||
$item->timestamp // Timestamp of the item in numeric format (use `strtotime`)
|
||||
$item->author // Name of the author
|
||||
$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['uri'] // URI to reach the subject ("http://...")
|
||||
$item['title'] // Title of the item
|
||||
$item['timestamp'] // Timestamp of the item in numeric format (use `strtotime`)
|
||||
$item['author'] // Name of the author
|
||||
$item['content'] // Content in HTML format
|
||||
```
|
||||
|
||||
### Item usage
|
||||
|
Reference in New Issue
Block a user