MediaWiki master
MediaWiki\Feed\ChannelFeed Class Reference

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

Inherits MediaWiki\Feed\FeedItem.

Inherited by MediaWiki\Feed\AtomFeed, and MediaWiki\Feed\RSSFeed.

Collaboration diagram for MediaWiki\Feed\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 MediaWiki\Feed\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
 
- Protected Attributes inherited from MediaWiki\Feed\FeedItem
UrlUtils $urlUtils
 

Additional Inherited Members

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

Detailed Description

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

Stability: stable
to extend

Definition at line 38 of file ChannelFeed.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Feed\ChannelFeed::__construct ( $title,
$description,
$url,
$date = '',
$author = '',
$comments = '' )
Stability: stable
to call
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 MediaWiki\Feed\FeedItem.

Definition at line 54 of file ChannelFeed.php.

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

Member Function Documentation

◆ httpHeaders()

MediaWiki\Feed\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 97 of file ChannelFeed.php.

References $wgOut, MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\MainConfigNames\VaryOnXFP.

Referenced by MediaWiki\Feed\ChannelFeed\outXmlHeader().

◆ outFooter()

MediaWiki\Feed\ChannelFeed::outFooter ( )
abstract

Generate Footer of the feed.

Example:
print "</feed>";

Reimplemented in MediaWiki\Feed\AtomFeed, and MediaWiki\Feed\RSSFeed.

◆ outHeader()

MediaWiki\Feed\ChannelFeed::outHeader ( )
abstract

Generate Header of the feed.

Example:
print "<feed>";

Reimplemented in MediaWiki\Feed\AtomFeed, and MediaWiki\Feed\RSSFeed.

◆ outItem()

MediaWiki\Feed\ChannelFeed::outItem ( $item)
abstract

Generate an item.

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

Reimplemented in MediaWiki\Feed\AtomFeed, and MediaWiki\Feed\RSSFeed.

◆ outXmlHeader()

MediaWiki\Feed\ChannelFeed::outXmlHeader ( )
protected

Output the initial XML headers.

Definition at line 141 of file ChannelFeed.php.

References MediaWiki\Feed\ChannelFeed\httpHeaders().

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

Member Data Documentation

◆ $templateParser

TemplateParser MediaWiki\Feed\ChannelFeed::$templateParser
protected

Definition at line 41 of file ChannelFeed.php.


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