Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
RSS_Feed_Writer Class Reference

Public Member Functions

 RSS_Feed_Writer ()
 
 addItems ($items)
 
 addChannel ($channel)
 
 addImage ($image)
 
 setTypeVersion ($type='', $version='')
 
 getRSSString ($header=TRUE, $encoding='iso-8859-1')
 
 _isTypeVersionSet ()
 

Data Fields

 $items = Array()
 
 $image = Array()
 
 $channel = Array()
 
 $rss = ''
 
 $type = ''
 
 $version = ''
 

Detailed Description

Definition at line 29 of file rss_feed_writer.inc.

Member Function Documentation

_isTypeVersionSet ( )

Checks if the type and version are set or not and returns TRUE if set else triggers error

Returns
boolean private

Definition at line 428 of file rss_feed_writer.inc.

addChannel (   $channel)

Adds the channel info into the channel array

Parameters
array$channelthe channel to be added into the array
Returns
void public

Definition at line 120 of file rss_feed_writer.inc.

addImage (   $image)

Adds the image info into the image array

Parameters
array$imagethe image to be added into the array
Returns
void public

Definition at line 148 of file rss_feed_writer.inc.

addItems (   $items)

Assigns the class variable items

Parameters
array$itemsthe items to be added into the array
Returns
void public

Definition at line 93 of file rss_feed_writer.inc.

getRSSString (   $header = TRUE,
  $encoding = 'iso-8859-1' 
)

Gets the RSS in a string format for all of the information saved like the channel, image and items

Parameters
boolean$headerif an appropriate header has to be included or not. Defaults to TRUE
string$endoingencoding attribute in XML declaration. Default is Western European(ISO)
Returns
string public

Definition at line 216 of file rss_feed_writer.inc.

Constructor

Definition at line 79 of file rss_feed_writer.inc.

setTypeVersion (   $type = '',
  $version = '' 
)

Saves the type and version of the RSS to be generated

Parameters
string$typethe type of RSS to be created
string$versionthe version of the RSS
Returns
void public

Definition at line 177 of file rss_feed_writer.inc.


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