Methods summary
public
|
#
__construct( string $module_id, string $name = self::DEFAULT_FEED_NAME, integer $id_cat = 0 )
Builds a new feed object
Parameters
- $module_id
- its module_id
- $name
- the feeds name / type. default is DEFAULT_FEED_NAME
- $id_cat
- the feed category id
|
public
|
#
load_data( FeedData $data )
Loads a FeedData element
Parameters
- $data
- the element to load
|
public
|
#
load_file( string $url )
Loads a feed by its url
Parameters
|
public
string
|
#
export( mixed $template = false, integer $number = 10, integer $begin_at = 0 )
Exports the feed as a string parsed by the <$tpl> template
Exports the feed as a string parsed by the <$tpl> template
Parameters
- $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
- $number
- the number of item to display
- $begin_at
- the first item to display
Returns
string The exported feed
|
public
string
|
#
read( )
Loads the feed data in cache and export it
Loads the feed data in cache and export it
Returns
string the exported feed
|
public
|
#
cache( )
Send the feed data in the cache
Send the feed data in the cache
|
public
boolean
|
#
is_in_cache( )
Returns true if the feed data are in the cache
Returns true if the feed data are in the cache
Returns
boolean true if the feed data are in the cache
|
public
string
|
#
get_cache_file_name( )
Returns the feed data cache filename
Returns the feed data cache filename
Returns
string the feed data cache filename
|
public static
|
#
clear_cache( mixed $module_id = false )
Clear the cache of the specified module_id.
Clear the cache of the specified module_id.
Parameters
- $module_id
the module module_id or false. If false,
Clear all feeds data from the cache
|
public static
string
|
#
get_parsed( string $module_id, string $name = self::DEFAULT_FEED_NAME, integer $idcat = 0, mixed $template = false, integer $number = 10, integer $begin_at = 0 )
Export a feed
Parameters
- $module_id
- the module id
- $name
- the feed name / type
- $idcat
- the feed data category
- $template
$tpl 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
- $number
- the number of item to display
- $begin_at
- the first item to display
Returns
string The exported feed
|