Add items to feed. For imte format - see addItem().
void
addData
(array $aItems)
-
array
$aItems: items info (array of info arrays)
Add single item to feed.
void
addItem
(array $aItem)
-
array
$aItem: single item info:
- title - item title
- descr - item description
- link - link for item full version
- dc:... - [optional] Dublin Core module params (see http://dublincore.org/documents/1999/07/02/dces/)
Get source XML-code for RSS.
string
get
()
Send generated XML-code to output.
void
send
()
Set channel information
void
setChannel
(string $sTitle, string $sDescr, string $sLink, string $sAbout, [array $aParams = array()])
-
string
$sTitle: channel's title
-
string
$sDescr: channel's descripton
-
string
$sLink: channel's link
-
string
$sAbout: channel's url (url of RSS)
-
array
$aParams: additional parameters for different modules:
- Syndication - 'sy:updatePeriod', 'sy:updateFrequency', 'sy:updateBase'
Set image for channel
void
setImage
(array $image)
-
array
$image: image info:
- title - image title
3. url - url of image file 2. link - url for image href
Enclode string in <![CDATA[ ... ]]> if needed
string
_escape
(string $sStr)
-
string
$sStr: source string
Create channel part of code
string
_getChannel
()
Create image part of code
string
_getImage
()
Create code for items
string
_getItems
()