MediaWiki  1.28.0
FeedItem Class Reference

A base class for basic support for outputting syndication feeds in RSS and other formats. More...

Inheritance diagram for FeedItem:
Collaboration diagram for FeedItem:

Public Member Functions

 __construct ($title, $description, $url, $date= '', $author= '', $comments= '')
 Constructor. More...
 
 getAuthor ()
 Get the author of this item; already xml-encoded. More...
 
 getComments ()
 Get the comment of this item; already xml-encoded. More...
 
 getDate ()
 Get the date of this item. More...
 
 getDescription ()
 Get the description of this item; already xml-encoded. 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. More...
 
 getUrl ()
 Get the URL of this item; already xml-encoded. 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...
 

Static Public Member Functions

static stripComment ($text)
 Quickie hack... More...
 

Public Attributes

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

Detailed Description

A base class for basic support for outputting syndication feeds in RSS and other formats.

Definition at line 38 of file Feed.php.

Constructor & Destructor Documentation

FeedItem::__construct (   $title,
  $description,
  $url,
  $date = '',
  $author = '',
  $comments = '' 
)

Constructor.

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

Definition at line 66 of file Feed.php.

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

Member Function Documentation

FeedItem::getAuthor ( )

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

Returns
string

Definition at line 161 of file Feed.php.

References author, and xmlEncode().

FeedItem::getComments ( )

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

Returns
string

Definition at line 170 of file Feed.php.

References xmlEncode().

FeedItem::getDate ( )

Get the date of this item.

Returns
string

Definition at line 152 of file Feed.php.

References $date.

FeedItem::getDescription ( )

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

Returns
string

Definition at line 133 of file Feed.php.

References xmlEncode().

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

FeedItem::getLanguage ( )

Get the language of this item.

Returns
string

Definition at line 142 of file Feed.php.

References $wgLanguageCode, global, and wfBCP47().

Referenced by RSSFeed\outHeader().

FeedItem::getTitle ( )

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

Returns
string

Definition at line 115 of file Feed.php.

References title, and xmlEncode().

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

FeedItem::getUniqueId ( )

Get the unique id of this item.

Returns
string

Definition at line 93 of file Feed.php.

References PROTO_CURRENT, wfExpandUrl(), and xmlEncode().

FeedItem::getUrl ( )

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

Returns
string

Definition at line 124 of file Feed.php.

References xmlEncode().

Referenced by RSSFeed\outHeader().

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 105 of file Feed.php.

References $rssIsPermalink, and $uniqueId.

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 180 of file Feed.php.

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

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 82 of file Feed.php.

Referenced by getAuthor(), getComments(), getDescription(), getTitle(), getUniqueId(), and getUrl().

Member Data Documentation

FeedItem::$author

Definition at line 48 of file Feed.php.

Referenced by __construct().

FeedItem::$comments

Definition at line 52 of file Feed.php.

Referenced by __construct().

FeedItem::$date

Definition at line 46 of file Feed.php.

Referenced by __construct(), and getDate().

FeedItem::$description

Definition at line 42 of file Feed.php.

Referenced by __construct().

FeedItem::$rssIsPermalink = false

Definition at line 54 of file Feed.php.

Referenced by setUniqueId().

Title FeedItem::$title

Definition at line 40 of file Feed.php.

Referenced by __construct().

FeedItem::$uniqueId

Definition at line 50 of file Feed.php.

Referenced by setUniqueId().

FeedItem::$url

Definition at line 44 of file Feed.php.

Referenced by __construct().


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