MediaWiki REL1_31
ChannelFeed Class Reference

Class to support the outputting of syndication feeds in Atom and RSS format. More...

Inheritance diagram for ChannelFeed:
Collaboration diagram for ChannelFeed:

Public Member Functions

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

Protected Member Functions

 outXmlHeader ()
 Output the initial XML headers.
 

Protected Attributes

TemplateParser $templateParser
 

Private Member Functions

 contentType ()
 Return an internet media type to be sent in the headers.
 

Additional Inherited Members

- Static Public Member Functions inherited from FeedItem
static stripComment ( $text)
 Quickie hack... strip out wikilinks to more legible form from the comment.
 
- Public Attributes inherited from FeedItem
 $author
 
 $comments
 
 $date
 
 $description
 
 $rssIsPermalink = false
 
Title $title
 
 $uniqueId
 
 $url
 

Detailed Description

Class to support the outputting of syndication feeds in Atom and RSS format.

Definition at line 234 of file Feed.php.

Constructor & Destructor Documentation

◆ __construct()

ChannelFeed::__construct ( $title,
$description,
$url,
$date = '',
$author = '',
$comments = '' )
Parameters
string | Title$titleFeed's title
string$description
string$urlURL uniquely designating the feed.
string$dateFeed's date
string$authorAuthor's user name
string$comments

Reimplemented from FeedItem.

Definition at line 247 of file Feed.php.

References FeedItem\$author, FeedItem\$comments, FeedItem\$date, FeedItem\$description, and FeedItem\$url.

Member Function Documentation

◆ contentType()

ChannelFeed::contentType ( )
private

Return an internet media type to be sent in the headers.

Returns
string

Definition at line 313 of file Feed.php.

References $wgRequest.

Referenced by httpHeaders().

◆ httpHeaders()

ChannelFeed::httpHeaders ( )

Setup and send HTTP headers.

Don't send any content; content might end up being cached and re-sent with these same headers later.

This should be called from the outHeader() method, but can also be called separately.

Definition at line 288 of file Feed.php.

References $ext, $wgOut, $wgVaryOnXFP, and contentType().

Referenced by outXmlHeader().

◆ outFooter()

ChannelFeed::outFooter ( )
abstract

Generate Footer of the feed.

Example:
print "</feed>";
while(( $__line=Maintenance::readconsole()) !==false) print
Definition eval.php:64

Reimplemented in RSSFeed, and AtomFeed.

◆ outHeader()

ChannelFeed::outHeader ( )
abstract

Generate Header of the feed.

Example:
print "<feed>";

Reimplemented in RSSFeed, and AtomFeed.

◆ outItem()

ChannelFeed::outItem ( $item)
abstract

Generate an item.

Example:
print "<item>...</item>";
Parameters
FeedItem$item

Reimplemented in RSSFeed, and AtomFeed.

◆ outXmlHeader()

ChannelFeed::outXmlHeader ( )
protected

Output the initial XML headers.

Definition at line 330 of file Feed.php.

References httpHeaders().

Referenced by RSSFeed\outHeader(), and AtomFeed\outHeader().

Member Data Documentation

◆ $templateParser

TemplateParser ChannelFeed::$templateParser
protected

Definition at line 237 of file Feed.php.


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