Summary
- File
- Package hierarchy Content\Feed
- Class hierarchy \Feed \RSS
This class could load a feed by its url or by a FeedData element and export it to the RSS format
This class could load a feed by its url or by a FeedData element and export it to the RSS format
__construct(string $module_id, string $feed_name = \Feed::DEFAULT_FEED_NAME, integer $id_cat)
Builds a new RSS object
string | $module_id | its module_id |
string | $feed_name | the feeds name / type. default is Feed::DEFAULT_FEED_NAME |
integer | $id_cat | the feed category id |
None found |
load_data(\FeedData $data)
Loads a FeedData element
\FeedData | $data | the element to load |
None found |
load_file(string $url)
Loads a feed by its url
string | $url | the feed url |
None found |
export(mixed $template = false, integer $number = 10, integer $begin_at) : string
Exports the feed as a string parsed by the <$tpl> template
mixed | $template | If false, uses de default tpl. If an associative array, uses the default tpl but assigns it the array vars first. It could also be a Template object |
integer | $number | the number of item to display |
integer | $begin_at | the first item to display |
The exported feed
None found |
read() : string
Loads the feed data in cache and export it
the exported feed
None found |
cache()
Send the feed data in the cache
None found |
is_in_cache() : boolean
Returns true if the feed data are in the cache
true if the feed data are in the cache
None found |
get_cache_file_name() : string
Returns the feed data cache filename
the feed data cache filename
None found |
clear_cache(mixed $module_id = false)
Clear the cache of the specified module_id.
mixed | $module_id | the module module_id or false. If false, Clear all feeds data from the cache |
static |
get_parsed(string $module_id, string $name = self::DEFAULT_FEED_NAME, integer $idcat, $template = false, integer $number = 10, integer $begin_at) : string
Export a feed
string | $module_id | the module id |
string | $name | the feed name / type |
integer | $idcat | the feed data category |
$template | ||
integer | $number | the number of item to display |
integer | $begin_at | the first item to display |
The exported feed
static |
get_feed_menu( $module_id, $id_cat) : string
$module_id | ||
$id_cat |
The HTML code to display.
static |
Generates the code which shows all the feeds formats. |
update_cache(string $module_id, string $name, \&FeedData $data, integer $idcat)
Update the cache of the $module_id, $name, $idcat feed with $data
string | $module_id | the module id |
string | $name | the feed name / type |
\&FeedData | $data | the data to put in the cache |
integer | $idcat | the feed data category |
static |
$tpl : string
None found |
$module_id : integer
None found |
$id_cat : integer
None found |
$name : string
None found |
$str : string
None found |
$data : string
None found |
$default_rss_template :
None found |
DEFAULT_FEED_NAME = 'master'
None found |