MediaWiki REL1_40
MediaWiki\Feed\FeedItem Class Reference

A base class for outputting syndication feeds (e.g. More...

Inherited by MediaWiki\Feed\ChannelFeed.

Collaboration diagram for MediaWiki\Feed\FeedItem:

Public Member Functions

 __construct ( $title, $description, $url, $date='', $author='', $comments='')
 
 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.
 

Static Public Member Functions

static stripComment ( $text)
 Quickie hack... strip out wikilinks to more legible form from the comment.
 

Public Attributes

 $author
 
 $comments
 
 $date
 
 $description
 
 $rssIsPermalink = false
 
Title $title
 
 $uniqueId
 
 $url
 

Detailed Description

A base class for outputting syndication feeds (e.g.

RSS and other formats).

Definition at line 40 of file FeedItem.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Feed\FeedItem::__construct ( $title,
$description,
$url,
$date = '',
$author = '',
$comments = '' )
Parameters
string | Title$titleItem's title
string$description
string$urlURL uniquely designating the item.
string$dateItem's date
string$authorAuthor's user name
string$comments

Reimplemented in MediaWiki\Feed\ChannelFeed.

Definition at line 66 of file FeedItem.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

◆ getAuthor()

MediaWiki\Feed\FeedItem::getAuthor ( )

Get the author of this item; already xml-encoded.

Returns
string

Definition at line 191 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\xmlEncode().

◆ getAuthorUnescaped()

MediaWiki\Feed\FeedItem::getAuthorUnescaped ( )

Get the author of this item without any escaping.

Returns
string

Definition at line 200 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\$author.

◆ getComments()

MediaWiki\Feed\FeedItem::getComments ( )

Get the comment of this item; already xml-encoded.

Returns
string

Definition at line 209 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\xmlEncode().

◆ getCommentsUnescaped()

MediaWiki\Feed\FeedItem::getCommentsUnescaped ( )

Get the comment of this item without any escaping.

Returns
string

Definition at line 218 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\$comments.

◆ getDate()

MediaWiki\Feed\FeedItem::getDate ( )

Get the date of this item.

Returns
string

Definition at line 182 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\$date.

◆ getDescription()

MediaWiki\Feed\FeedItem::getDescription ( )

Get the description of this item; already xml-encoded.

Returns
string

Definition at line 153 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\xmlEncode().

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

◆ getDescriptionUnescaped()

MediaWiki\Feed\FeedItem::getDescriptionUnescaped ( )

Get the description of this item without any escaping.

Returns
string

Definition at line 162 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\$description.

◆ getLanguage()

MediaWiki\Feed\FeedItem::getLanguage ( )

Get the language of this item.

Returns
string

Definition at line 171 of file FeedItem.php.

References MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\MainConfigNames\LanguageCode.

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

◆ getTitle()

MediaWiki\Feed\FeedItem::getTitle ( )

Get the title of this item; already xml-encoded.

Returns
string

Definition at line 127 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\xmlEncode().

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

◆ getUniqueID()

MediaWiki\Feed\FeedItem::getUniqueID ( )

Get the unique id of this item; already xml-encoded.

Returns
string

Definition at line 94 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\getUniqueIdUnescaped(), and MediaWiki\Feed\FeedItem\xmlEncode().

◆ getUniqueIdUnescaped()

MediaWiki\Feed\FeedItem::getUniqueIdUnescaped ( )

Get the unique id of this item, without any escaping.

Returns
string

Definition at line 105 of file FeedItem.php.

References PROTO_CURRENT, and wfExpandUrl().

Referenced by MediaWiki\Feed\FeedItem\getUniqueID().

◆ getUrl()

MediaWiki\Feed\FeedItem::getUrl ( )

Get the URL of this item; already xml-encoded.

Returns
string

Definition at line 136 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\xmlEncode().

◆ getUrlUnescaped()

MediaWiki\Feed\FeedItem::getUrlUnescaped ( )

Get the URL of this item without any escaping.

Returns
string

Definition at line 144 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\$url.

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

◆ setUniqueId()

MediaWiki\Feed\FeedItem::setUniqueId ( $uniqueId,
$rssIsPermalink = false )

Set the unique id of an item.

Parameters
string$uniqueIdUnique id for the item
bool$rssIsPermalinkSet to true if the guid (unique id) is a permalink (RSS feeds only)

Definition at line 117 of file FeedItem.php.

References MediaWiki\Feed\FeedItem\$rssIsPermalink, and MediaWiki\Feed\FeedItem\$uniqueId.

◆ stripComment()

static MediaWiki\Feed\FeedItem::stripComment ( $text)
static

Quickie hack... strip out wikilinks to more legible form from the comment.

Parameters
string$textWikitext
Returns
string

Definition at line 228 of file FeedItem.php.

◆ xmlEncode()

Member Data Documentation

◆ $author

◆ $comments

◆ $date

MediaWiki\Feed\FeedItem::$date

◆ $description

◆ $rssIsPermalink

MediaWiki\Feed\FeedItem::$rssIsPermalink = false

Definition at line 56 of file FeedItem.php.

Referenced by MediaWiki\Feed\FeedItem\setUniqueId().

◆ $title

Title MediaWiki\Feed\FeedItem::$title

◆ $uniqueId

MediaWiki\Feed\FeedItem::$uniqueId

Definition at line 52 of file FeedItem.php.

Referenced by MediaWiki\Feed\FeedItem\setUniqueId().

◆ $url


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