RssParser
class RssParser (View source)
Class to parse RSS files
Properties
| DoliDB | $db | ||
| string | $error | ||
| string | $feed_version | ||
| $items | |||
| array<string, string>|array<string, array<string, string>> | $current_item | ||
| SimpleXMLElement|array<string, mixed> | $channel | ||
| array<string, array<string, string>> | $textinput | ||
| array<string, array<string, string>> | $image | ||
| string[] | $stack |
Methods
Constructor
getFormat
getUrlRss
getLanguage
getGenerator
getCopyright
getLastBuildDate
getImageUrl
getLink
getTitle
getDescription
getLastFetchDate
getItems
Parse rss URL
Triggered when opened tag is found
Triggered when CDATA is found
Triggered when closed tag is found
To concat 2 strings with no warning if an operand is not defined
Enter description here .
smart append - field and namespace aware
Details
__construct($db)
Constructor
@param DoliDB $db Database handler
string
getFormat()
getFormat
string
getUrlRss()
getUrlRss
string
getLanguage()
getLanguage
string
getGenerator()
getGenerator
string
getCopyright()
getCopyright
string
getLastBuildDate()
getLastBuildDate
string
getImageUrl()
getImageUrl
string
getLink()
getLink
string
getTitle()
getTitle
string
getDescription()
getDescription
int
getLastFetchDate()
getLastFetchDate
array<array{link: string, title: string, description: string, pubDate: string, category: string, id: string, author: string}>
getItems()
getItems
int
parser($urlRSS, int $maxNb = 0, $cachedelay = 60, $cachedir = '')
Parse rss URL
@param string $urlRSS Url to parse
feed_start_element($p, string $element, $attrs)
Triggered when opened tag is found
@param string $p Start
feed_cdata($p, string $text)
Triggered when CDATA is found
@param string $p P
feed_end_element($p, string $el)
Triggered when closed tag is found
@param string $p P
concat($str1, string $str2 = "")
To concat 2 strings with no warning if an operand is not defined
@param string $str1 Str1
void
append_content(string $text)
Enter description here .
..
append($el, string $text)
smart append - field and namespace aware
@param string $el El