dolibarr  9.0.0
Public Member Functions | List of all members
RssParser Class Reference

Class to parse RSS files. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 getFormat ()
 getFormat More...
 
 getUrlRss ()
 getUrlRss More...
 
 getLanguage ()
 getLanguage More...
 
 getGenerator ()
 getGenerator More...
 
 getCopyright ()
 getCopyright More...
 
 getLastBuildDate ()
 getLastBuildDate More...
 
 getImageUrl ()
 getImageUrl More...
 
 getLink ()
 getLink More...
 
 getTitle ()
 getTitle More...
 
 getDescription ()
 getDescription More...
 
 getLastFetchDate ()
 getLastFetchDate More...
 
 getItems ()
 getItems More...
 
 parser ($urlRSS, $maxNb=0, $cachedelay=60, $cachedir='')
 Parse rss URL. More...
 
 feed_start_element ($p, $element, &$attrs)
 Triggered when opened tag is found. More...
 
 feed_cdata ($p, $text)
 Triggered when CDATA is found. More...
 
 feed_end_element ($p, $el)
 Triggered when closed tag is found. More...
 
 concat (&$str1, $str2="")
 To concat 2 string with no warning if an operand is not defined. More...
 
 append_content ($text)
 Enter description here ... More...
 
 append ($el, $text)
 smart append - field and namespace aware More...
 

Detailed Description

Class to parse RSS files.

Definition at line 27 of file rssparser.class.php.

Constructor & Destructor Documentation

◆ __construct()

RssParser::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 62 of file rssparser.class.php.

Member Function Documentation

◆ append()

RssParser::append (   $el,
  $text 
)

smart append - field and namespace aware

Parameters
string$elEl
string$textText
Returns
void

Definition at line 702 of file rssparser.class.php.

◆ append_content()

RssParser::append_content (   $text)

Enter description here ...

Parameters
string$textText
Returns
void

Definition at line 684 of file rssparser.class.php.

◆ concat()

RssParser::concat ( $str1,
  $str2 = "" 
)

To concat 2 string with no warning if an operand is not defined.

Parameters
string$str1Str1
string$str2Str2
Returns
string String cancatenated

Definition at line 669 of file rssparser.class.php.

◆ feed_cdata()

RssParser::feed_cdata (   $p,
  $text 
)

Triggered when CDATA is found.

Parameters
string$pP
string$textTag
Returns
void

Definition at line 592 of file rssparser.class.php.

◆ feed_end_element()

RssParser::feed_end_element (   $p,
  $el 
)

Triggered when closed tag is found.

Parameters
string$pP
string$elTag
Returns
void

Definition at line 614 of file rssparser.class.php.

◆ feed_start_element()

RssParser::feed_start_element (   $p,
  $element,
$attrs 
)

Triggered when opened tag is found.

Parameters
string$pStart
string$elementTag
array$attrsAttributes of tags
Returns
void

Definition at line 473 of file rssparser.class.php.

◆ getCopyright()

RssParser::getCopyright ( )

getCopyright

Returns
string

Definition at line 109 of file rssparser.class.php.

◆ getDescription()

RssParser::getDescription ( )

getDescription

Returns
string

Definition at line 154 of file rssparser.class.php.

◆ getFormat()

RssParser::getFormat ( )

getFormat

Returns
string

Definition at line 72 of file rssparser.class.php.

◆ getGenerator()

RssParser::getGenerator ( )

getGenerator

Returns
string

Definition at line 100 of file rssparser.class.php.

◆ getImageUrl()

RssParser::getImageUrl ( )

getImageUrl

Returns
string

Definition at line 127 of file rssparser.class.php.

◆ getItems()

RssParser::getItems ( )

getItems

Returns
string

Definition at line 172 of file rssparser.class.php.

◆ getLanguage()

RssParser::getLanguage ( )

getLanguage

Returns
string

Definition at line 91 of file rssparser.class.php.

◆ getLastBuildDate()

RssParser::getLastBuildDate ( )

getLastBuildDate

Returns
string

Definition at line 118 of file rssparser.class.php.

◆ getLastFetchDate()

RssParser::getLastFetchDate ( )

getLastFetchDate

Returns
string

Definition at line 163 of file rssparser.class.php.

◆ getLink()

RssParser::getLink ( )

getLink

Returns
string

Definition at line 136 of file rssparser.class.php.

◆ getTitle()

RssParser::getTitle ( )

getTitle

Returns
string

Definition at line 145 of file rssparser.class.php.

◆ getUrlRss()

RssParser::getUrlRss ( )

getUrlRss

Returns
string

Definition at line 82 of file rssparser.class.php.

◆ parser()

RssParser::parser (   $urlRSS,
  $maxNb = 0,
  $cachedelay = 60,
  $cachedir = '' 
)

Parse rss URL.

Parameters
string$urlRSSUrl to parse
int$maxNbMax nb of records to get (0 for no limit)
int$cachedelay0=No cache, nb of seconds we accept cache files (cachedir must also be defined)
string$cachedirDirectory where to save cache file
Returns
int <0 if KO, >0 if OK

Definition at line 187 of file rssparser.class.php.


The documentation for this class was generated from the following file: