Class to parse RSS files.
More...
Class to parse RSS files.
Definition at line 27 of file rssparser.class.php.
◆ __construct()
RssParser::__construct |
( |
|
$db | ) |
|
◆ append()
RssParser::append |
( |
|
$el, |
|
|
|
$text |
|
) |
| |
smart append - field and namespace aware
- Parameters
-
string | $el | El |
string | $text | Text |
- Returns
- void
Definition at line 709 of file rssparser.class.php.
◆ append_content()
RssParser::append_content |
( |
|
$text | ) |
|
◆ concat()
RssParser::concat |
( |
& |
$str1, |
|
|
|
$str2 = "" |
|
) |
| |
To concat 2 string with no warning if an operand is not defined.
- Parameters
-
string | $str1 | Str1 |
string | $str2 | Str2 |
- Returns
- string String cancatenated
Definition at line 677 of file rssparser.class.php.
◆ feed_cdata()
RssParser::feed_cdata |
( |
|
$p, |
|
|
|
$text |
|
) |
| |
◆ feed_end_element()
RssParser::feed_end_element |
( |
|
$p, |
|
|
|
$el |
|
) |
| |
Triggered when closed tag is found.
- Parameters
-
- Returns
- void
Definition at line 635 of file rssparser.class.php.
◆ feed_start_element()
RssParser::feed_start_element |
( |
|
$p, |
|
|
|
$element, |
|
|
|
$attrs |
|
) |
| |
Triggered when opened tag is found.
- Parameters
-
string | $p | Start |
string | $element | Tag |
array | $attrs | Attributes of tags |
- Returns
- void
Definition at line 528 of file rssparser.class.php.
◆ getAtomImageUrl()
RssParser::getAtomImageUrl |
( |
array |
$feed | ) |
|
|
private |
Return a URL to a image of the given ATOM feed.
- Parameters
-
array | $feed | The ATOM feed that possible contain a link to a logo or icon |
- Returns
- string A URL to a image from a ATOM feed when found, otherwise a empty string
Definition at line 774 of file rssparser.class.php.
◆ getAtomItemDescription()
RssParser::getAtomItemDescription |
( |
array |
$item, |
|
|
|
$maxlength = 500 |
|
) |
| |
|
private |
Return a description/summary for one item from a ATOM feed.
- Parameters
-
array | $item | A parsed item of a ATOM feed |
int | $maxlength | (optional) The maximum length for the description |
- Returns
- string A summary description
Definition at line 744 of file rssparser.class.php.
◆ getCopyright()
RssParser::getCopyright |
( |
| ) |
|
◆ getDescription()
RssParser::getDescription |
( |
| ) |
|
◆ getFormat()
◆ getGenerator()
RssParser::getGenerator |
( |
| ) |
|
◆ getImageUrl()
RssParser::getImageUrl |
( |
| ) |
|
◆ getItems()
◆ getLanguage()
RssParser::getLanguage |
( |
| ) |
|
◆ getLastBuildDate()
RssParser::getLastBuildDate |
( |
| ) |
|
◆ getLastFetchDate()
RssParser::getLastFetchDate |
( |
| ) |
|
◆ getLink()
◆ getTitle()
◆ getUrlRss()
◆ parser()
RssParser::parser |
( |
|
$urlRSS, |
|
|
|
$maxNb = 0 , |
|
|
|
$cachedelay = 60 , |
|
|
|
$cachedir = '' |
|
) |
| |
Parse rss URL.
- Parameters
-
string | $urlRSS | Url to parse |
int | $maxNb | Max nb of records to get (0 for no limit) |
int | $cachedelay | 0=No cache, nb of seconds we accept cache files (cachedir must also be defined) |
string | $cachedir | Directory where to save cache file (For example $conf->externalrss->dir_temp) |
- Returns
- int <0 if KO, >0 if OK
Definition at line 195 of file rssparser.class.php.
The documentation for this class was generated from the following file: