MediaWiki  master
RSSFeed Class Reference

Generate an RSS feed. More...

Inheritance diagram for RSSFeed:
Collaboration diagram for RSSFeed:

Public Member Functions

 formatTime ( $ts)
 Format a date given a timestamp. More...
 
 outFooter ()
 Output an RSS 2.0 footer. More...
 
 outHeader ()
 Output an RSS 2.0 header. More...
 
 outItem ( $item)
 Output an RSS 2.0 item. More...
 
- Public Member Functions inherited from ChannelFeed
 __construct ( $title, $description, $url, $date='', $author='', $comments='')
 
 httpHeaders ()
 Setup and send HTTP headers. More...
 
 outFooter ()
 Generate Footer of the feed. More...
 
 outHeader ()
 Generate Header of the feed. More...
 
 outItem ( $item)
 Generate an item. More...
 
- Public Member Functions inherited from FeedItem
 __construct ( $title, $description, $url, $date='', $author='', $comments='')
 
 getAuthor ()
 Get the author of this item; already xml-encoded. More...
 
 getAuthorUnescaped ()
 Get the author of this item without any escaping. More...
 
 getComments ()
 Get the comment of this item; already xml-encoded. More...
 
 getCommentsUnescaped ()
 Get the comment of this item without any escaping. More...
 
 getDate ()
 Get the date of this item. More...
 
 getDescription ()
 Get the description of this item; already xml-encoded. More...
 
 getDescriptionUnescaped ()
 Get the description of this item without any escaping. More...
 
 getLanguage ()
 Get the language of this item. More...
 
 getTitle ()
 Get the title of this item; already xml-encoded. More...
 
 getUniqueID ()
 Get the unique id of this item; already xml-encoded. More...
 
 getUniqueIdUnescaped ()
 Get the unique id of this item, without any escaping. More...
 
 getUrl ()
 Get the URL of this item; already xml-encoded. More...
 
 getUrlUnescaped ()
 Get the URL of this item without any escaping. More...
 
 setUniqueId ( $uniqueId, $rssIsPermalink=false)
 Set the unique id of an item. More...
 
 xmlEncode ( $string)
 Encode $string so that it can be safely embedded in a XML document. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FeedItem
static stripComment ( $text)
 Quickie hack... More...
 
- Public Attributes inherited from FeedItem
 $author
 
 $comments
 
 $date
 
 $description
 
 $rssIsPermalink = false
 
Title $title
 
 $uniqueId
 
 $url
 
- Protected Member Functions inherited from ChannelFeed
 outXmlHeader ()
 Output the initial XML headers. More...
 
- Protected Attributes inherited from ChannelFeed
TemplateParser $templateParser
 

Detailed Description

Generate an RSS feed.

Definition at line 29 of file RSSFeed.php.

Member Function Documentation

◆ formatTime()

RSSFeed::formatTime (   $ts)

Format a date given a timestamp.

If a timestamp is not given, nothing is returned

Parameters
int | null$tsTimestamp
Returns
string|null Date string

Definition at line 37 of file RSSFeed.php.

References wfTimestamp().

Referenced by outHeader(), and outItem().

◆ outFooter()

RSSFeed::outFooter ( )

Output an RSS 2.0 footer.

Definition at line 90 of file RSSFeed.php.

References print.

◆ outHeader()

◆ outItem()

RSSFeed::outItem (   $item)

Output an RSS 2.0 item.

Parameters
FeedItem$itemItem to be output

Definition at line 67 of file RSSFeed.php.

References FeedItem\$comments, formatTime(), print, PROTO_CURRENT, wfExpandUrl(), and FeedItem\xmlEncode().


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