IP.Board  3.3.0
classRss Class Reference

Public Member Functions

 __construct ()
 addImageToChannel ($channel_id=0, $in='')
 addItemToChannel ($channel_id=0, $in=array())
 createNewChannel ($in=array())
 createRssDocument ()
 formatDate ($time)
 formatImage ($in=array())
 parseFeedFromData ($data)
 parseFeedFromFile ($feed_location)
 parseFeedFromUrl ($feed_location)

Data Fields

 $auth_pass
 $auth_req = 0
 $auth_user
 $classFileManagement
 $collapse_newlines = 0
 $convert_charset = 1
 $doc_type = 'UTF-8'
 $errors = array()
 $orig_doc_type = ""
 $rss_channels = array()
 $rss_count = 0
 $rss_document = ''
 $rss_items = array()
 $rss_max_show = 3
 $use_sockets = 1
 $userAgent = ''

Protected Member Functions

 _formatString ($t)
 _killChannelElements ()
 _killElements ()
 _killImageElements ()
 _parseCharacterData ($parser, $data)
 _parseEndElement ($parser, $name)
 _parseStartElement ($parser, $name, $attrs)
 _xmlConvertSafeCdata ($v)
 _xmlDecodeAttribute ($t)
 _xmlEncodeAttribute ($t)
 _xmlEncodeString ($v)
 _xmlUnconvertSafeCdata ($v)

Protected Attributes

 $channel_images = array()
 $channels = array()
 $cur_channel = 0
 $cur_item = 0
 $htmlDecodingNeeded = false
 $in_channel = 0
 $in_image = 0
 $in_item = 0
 $items = array()
 $rss_category
 $rss_chan_date
 $rss_chan_desc
 $rss_chan_lang
 $rss_chan_link
 $rss_chan_title
 $rss_content
 $rss_creator
 $rss_date
 $rss_description
 $rss_guid
 $rss_headers = array()
 $rss_images = array()
 $rss_img_desc
 $rss_img_height
 $rss_img_link
 $rss_img_title
 $rss_img_url
 $rss_img_width
 $rss_link
 $rss_tag_names = array()
 $rss_title
 $set_ttl = 60
 $tag = ""

Constructor & Destructor Documentation

Constructor

Returns:
void

Member Function Documentation

_formatString ( t) [protected]

Format text string

Parameters:
stringRaw data
Returns:
string
_killChannelElements ( ) [protected]

Internal: Reset arrays

Returns:
void
_killElements ( ) [protected]

Internal: Reset arrays

Returns:
void
_killImageElements ( ) [protected]

Internal: Reset arrays

Returns:
void
_parseCharacterData ( parser,
data 
) [protected]

Extract: Call back function for element handler

Parameters:
objectParser object
stringCDATA
Returns:
void
_parseEndElement ( parser,
name 
) [protected]

Extract: Call back function for element handler

Parameters:
objectParser object
stringTag name
Returns:
void
_parseStartElement ( parser,
name,
attrs 
) [protected]

Extract: Call back function for element handler

Parameters:
objectParser object
stringTag name
arrayAttributes
Returns:
void
_xmlConvertSafeCdata ( v) [protected]

Encode CDATA XML attribute (Make safe for transport)

Parameters:
stringRaw data
Returns:
string
_xmlDecodeAttribute ( t) [protected]

Internal: Dencode attribute

Parameters:
stringRaw Text
Returns:
string
_xmlEncodeAttribute ( t) [protected]

Internal: Encode attribute

Parameters:
stringRaw Text
Returns:
string
_xmlEncodeString ( v) [protected]

Internal: Encode string

Parameters:
stringRaw Text
Returns:
string
_xmlUnconvertSafeCdata ( v) [protected]

Decode CDATA XML attribute (Make safe for transport)

Parameters:
stringRaw data
Returns:
string
addImageToChannel ( channel_id = 0,
in = '' 
)

Create RSS 2.0 document: Add channel image item

Parameters:
integerChannel ID
stringImage tag (formatted through formatImage)
Returns:
void
See also:
formatImage()
addItemToChannel ( channel_id = 0,
in = array() 
)

Create RSS 2.0 document: Add item

title,description,pubDate,guid,content,category,link

Parameters:
integerChannel ID
arrayArray of item variables
Returns:
void
createNewChannel ( in = array())

Create RSS 2.0 document: Add channel and return its ID

title, link, description,language,pubDate,lastBuildDate,docs,generator managingEditor,webMaster

Parameters:
arrayData to add
Returns:
integer

Create the RSS document

Returns:
void
formatDate ( time)

Create RSS 2.0 document: Format unixdate to rfc date

Parameters:
integerUnix timestamp
Returns:
string
formatImage ( in = array())

Create RSS 2.0 document: Format Image and return the HTML

Parameters:
arrayArray of item variables
Returns:
string
parseFeedFromData ( data)

Extract: Parse RSS document from data

Parameters:
stringRaw RSS data
Returns:
void
parseFeedFromFile ( feed_location)

Extract: Parse RSS document from file

Parameters:
stringPath
Returns:
void
parseFeedFromUrl ( feed_location)

Extract: Parse RSS document from URL

Parameters:
stringURI
Returns:
boolean

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables