Builds and outputs RSS feeds.
NOTE: Feed images are rarely dsplayed throughout most feed readers. Date function requires RFC822
package | dstruct_rss |
---|---|
author | Shane |
todo | This package could do with a re-write. Documentation isn't clear either. |
__construct()
addItem(\RSSItem $item)
getCategory() : string
Allows for the ability to add one or multiple categories that a channel belongs to
string
getCopyright() : string
The copyright notice for the content of the channel
string
getDescrip() : string
The description of the content of the channel
string
getDocs() : string
URL for the documentation for the format of the RSS feed
string
getGenerator() : string
The program that creates the channel
string
getImage() : string
Gets an image for the content of the channel
string
getImageDescrip() : string
string
getImageHeight() : integer
integer
getImageLink() : string
string
getImageTitle() : string
string
getImageURL() : string
string
getImageWidth() : integer
integer
getLanguage() : string
string
getLastBuildDate() : integer
Should be UTS date?
integer
getManagingEditor() : string
An e-mail address for the editorial content producer
string
getPubDateUTS() : integer
A date that represents the publication date for the content in the channel
integer
getRating() : string
PICS rating for the channel
string
getSkipDays() : integer
Tells aggregators to skip for specified days.
integer
getSkipHours() : integer
Tells aggregators to skip for specified hours
integer
getTTL() : integer
(Time to Live) which tells the length of time the channel can be cached. In seconds?
integer
getTextInput() : string
A text input field that can be displayed with the channel
string
getTitle() : string
The title of the content of the channel
string
getURL() : string
Gets the url of the channel
string
getWebMaster() : string
An e-mail address for the web master
string
output()
Creates the rss feed xml.
saveAsFile(string $filepath, string $filename)
Saves the file to the specified filepath Function checks for valid path If the file already exists, then it is overwritten, else a new file is created Checks for backslash at the end of the filepath, if returned false, then added
string
string
setCategory(string $category)
Allows for the ability to add one or multiple categories that a channel belongs to
string
setCopyright(string $copyright)
The copyright notice for the content of the channel
string
setDescrip(string $descrip)
Sets a description for the channel
string
setDocs(string $docs)
URL for the documentation for the format of the RSS feed
string
setGenerator(string $generator)
The program that creates the channel
string
setImageDescrip(string $imagedescrip)
Sets an image in the channel
string
setImageHeight(integer $imageheight)
Sets an image in the channel
integer
setImageLink(string $imagelink)
Sets an image in the channel
string
setImageTitle(string $imagetitle)
Sets an image in the channel
string
setImageURL(string $imageurl)
Sets an image in the channel
string
setImageWidth(integer $imagewidth)
Sets an image in the channel
integer
setItemAmount(integer $itemamount)
The number of Items to be displayed in the Feed, Default is 200.
integer
setLanguage(string $language)
Sets the language of the content in the channel.
todo | What format?? |
---|
string
setLastBuildDate(integer $lastbuilddate)
The last date and time that the content was changed
integer
UTS timestamp
setManagingEditor(string $managingeditor)
An e-mail address for the editorial content producer
string
setPubDateString(string $pubdate)
The pubDate is the date that the item was published Can be entered in any format getPubDateString method changes to UTS and calls getPubDateUTS method to format
string
setPubDateUTS(integer $pubdate)
The pubDate is the date that the item was published. Entered in UTS and formated to RFC822
integer
setRating(string $rating)
PICs rating for the channel
string
setSkipDays(integer $skipdays)
Tells aggregators to skip for specified day
todo | What does this mean? |
---|
integer
setSkipHours(integer $skiphours)
Tells aggregators to skip for specified hour.
todo | What does this mean? |
---|
integer
setTTL(integer $ttl)
(Time To Live) which tells the length of time the channel can be cached
integer
In seconds?
setTextInput(string $textinput)
A text nput field that can be displayed with the channel
string
setTitle(string $title)
Sets a title of the channel
string
setURL(string $url)
Sets the url for the channel
string
setWebMaster(string $webmaster)
An e-mail address for the web master
string
sortItems(string $element, string $sort_direction, string $caseinsensitive, string $params, string $astime)
see | \ObjCollection::sortObjects() |
---|
string
Element to sort by
string
string
string
string
validate() : boolean
Returns false if an RSS Feed title, description, URL or pubdate have not been entered.
todo | Should be more specific about what is missing! |
---|---|
todo | Should throw an error, rather than use trigger_error() |
boolean
Actually, only returns true if successful, otherwise, triggers and error.$category : string
see | \getCategory() |
---|
$copyright : string
see | \getCopyright() |
---|
$descrip : string
$docs : string
see | \getDocs() |
---|
$generator : string
see | \getGenerator() |
---|
$image : string
see | \getImage() |
---|
$imagedescrip : string
$imageheight : integer
$imagelink : string
see | \getImageLink() |
---|
$imagetitle : string
see | \getImageTitle() |
---|
$imageurl : string
see | \getImageURL() |
---|
$imagewidth : integer
see | \getImageWidth() |
---|
$itemamount
see | var integer. |
---|
$items : \RSSItems
see | \__construct() |
---|
$language : string
see | \getLanguage() |
---|
$lastbuilddate : string
$managingeditor : string
$pubdate : integer
see | \getPubDate() |
---|
$skipdays : string
see | \getSkipdays |
---|
$skiphours : integer
see | \getSkiphours() |
---|
$textinput : string
see | \getTextInput() |
---|
$title : string
see | \getTitle() |
---|
$ttl : integer
see | \getTTL() |
---|
$url : string
see | \getURL() |
---|
$webmaster : string
see | \getWebMaster() |
---|