MediaWiki REL1_34
FeedItem Class Reference

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

Inheritance diagram for FeedItem:
Collaboration diagram for 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 33 of file FeedItem.php.

Constructor & Destructor Documentation

◆ __construct()

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 ChannelFeed.

Definition at line 59 of file FeedItem.php.

References $author, $comments, $date, $description, $title, and $url.

Member Function Documentation

◆ getAuthor()

FeedItem::getAuthor ( )

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

Returns
string

Definition at line 181 of file FeedItem.php.

References xmlEncode().

◆ getAuthorUnescaped()

FeedItem::getAuthorUnescaped ( )

Get the author of this item without any escaping.

Returns
string

Definition at line 190 of file FeedItem.php.

References $author.

◆ getComments()

FeedItem::getComments ( )

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

Returns
string

Definition at line 199 of file FeedItem.php.

References xmlEncode().

◆ getCommentsUnescaped()

FeedItem::getCommentsUnescaped ( )

Get the comment of this item without any escaping.

Returns
string

Definition at line 208 of file FeedItem.php.

References $comments.

◆ getDate()

FeedItem::getDate ( )

Get the date of this item.

Returns
string

Definition at line 172 of file FeedItem.php.

References $date.

◆ getDescription()

FeedItem::getDescription ( )

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

Returns
string

Definition at line 144 of file FeedItem.php.

References xmlEncode().

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

◆ getDescriptionUnescaped()

FeedItem::getDescriptionUnescaped ( )

Get the description of this item without any escaping.

Returns
string

Definition at line 153 of file FeedItem.php.

References $description.

◆ getLanguage()

FeedItem::getLanguage ( )

Get the language of this item.

Returns
string

Definition at line 162 of file FeedItem.php.

References $wgLanguageCode.

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

◆ getTitle()

FeedItem::getTitle ( )

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

Returns
string

Definition at line 118 of file FeedItem.php.

References xmlEncode().

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

◆ getUniqueID()

FeedItem::getUniqueID ( )

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

Returns
string

Definition at line 85 of file FeedItem.php.

References getUniqueIdUnescaped(), and xmlEncode().

◆ getUniqueIdUnescaped()

FeedItem::getUniqueIdUnescaped ( )

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

Returns
string

Definition at line 96 of file FeedItem.php.

References PROTO_CURRENT, and wfExpandUrl().

Referenced by getUniqueID().

◆ getUrl()

FeedItem::getUrl ( )

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

Returns
string

Definition at line 127 of file FeedItem.php.

References xmlEncode().

◆ getUrlUnescaped()

FeedItem::getUrlUnescaped ( )

Get the URL of this item without any escaping.

Returns
string

Definition at line 135 of file FeedItem.php.

References $url.

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

◆ setUniqueId()

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 108 of file FeedItem.php.

References $rssIsPermalink, and $uniqueId.

◆ stripComment()

static FeedItem::stripComment ( $text)
static

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

Parameters
string$textWikitext
Returns
string

Definition at line 218 of file FeedItem.php.

Referenced by HistoryAction\feedItem(), SpecialNewpages\feedItemDesc(), and ApiFeedContributions\feedItemDesc().

◆ xmlEncode()

FeedItem::xmlEncode ( $string)

Encode $string so that it can be safely embedded in a XML document.

Parameters
string$stringString to encode
Returns
string

Definition at line 75 of file FeedItem.php.

Referenced by getAuthor(), getComments(), getDescription(), getTitle(), getUniqueID(), getUrl(), AtomFeed\outHeader(), RSSFeed\outHeader(), AtomFeed\outItem(), and RSSFeed\outItem().

Member Data Documentation

◆ $author

FeedItem::$author

Definition at line 43 of file FeedItem.php.

Referenced by ChannelFeed\__construct(), __construct(), and getAuthorUnescaped().

◆ $comments

FeedItem::$comments

◆ $date

FeedItem::$date

Definition at line 41 of file FeedItem.php.

Referenced by ChannelFeed\__construct(), __construct(), and getDate().

◆ $description

FeedItem::$description

Definition at line 37 of file FeedItem.php.

Referenced by ChannelFeed\__construct(), __construct(), and getDescriptionUnescaped().

◆ $rssIsPermalink

FeedItem::$rssIsPermalink = false

Definition at line 49 of file FeedItem.php.

Referenced by setUniqueId().

◆ $title

Title FeedItem::$title

Definition at line 35 of file FeedItem.php.

Referenced by ChannelFeed\__construct(), and __construct().

◆ $uniqueId

FeedItem::$uniqueId

Definition at line 45 of file FeedItem.php.

Referenced by setUniqueId().

◆ $url

FeedItem::$url

Definition at line 39 of file FeedItem.php.

Referenced by ChannelFeed\__construct(), __construct(), and getUrlUnescaped().


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