MediaWiki  1.23.2
FeedItem Class Reference

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

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 title 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

◆ __construct()

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

Constructor.

Parameters
string | Title$titleItem's title
$descriptionString
string$urlURL uniquely designating the item.
string$dateItem's date
string$authorAuthor's user name
$commentsString

Definition at line 61 of file Feed.php.

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

Member Function Documentation

◆ getAuthor()

FeedItem::getAuthor ( )

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

Returns
String

Definition at line 156 of file Feed.php.

References xmlEncode().

◆ getComments()

FeedItem::getComments ( )

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

Returns
String

Definition at line 165 of file Feed.php.

References xmlEncode().

◆ getDate()

FeedItem::getDate ( )

Get the title of this item.

Returns
String

Definition at line 147 of file Feed.php.

References $date.

◆ getDescription()

FeedItem::getDescription ( )

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

Returns
String

Definition at line 128 of file Feed.php.

References xmlEncode().

◆ getLanguage()

FeedItem::getLanguage ( )

Get the language of this item.

Returns
String

Definition at line 137 of file Feed.php.

References global.

◆ getTitle()

FeedItem::getTitle ( )

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

Returns
String

Definition at line 110 of file Feed.php.

References title, and xmlEncode().

◆ getUniqueId()

FeedItem::getUniqueId ( )

Get the unique id of this item.

Returns
String

Definition at line 88 of file Feed.php.

References xmlEncode().

◆ getUrl()

FeedItem::getUrl ( )

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

Returns
String

Definition at line 119 of file Feed.php.

References xmlEncode().

◆ setUniqueId()

FeedItem::setUniqueId (   $uniqueId,
  $rssIsPermalink = false 
)

set the unique id of an item

Parameters
string$uniqueIdunique id for the item
$rssIsPermalinkBoolean: set to true if the guid (unique id) is a permalink (RSS feeds only)

Definition at line 100 of file Feed.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 175 of file Feed.php.

Referenced by HistoryAction\feedItem(), ApiFeedContributions\feedItemDesc(), and SpecialNewpages\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 77 of file Feed.php.

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

Member Data Documentation

◆ $author

FeedItem::$author

Definition at line 46 of file Feed.php.

Referenced by __construct().

◆ $comments

FeedItem::$comments

Definition at line 48 of file Feed.php.

Referenced by __construct().

◆ $date

FeedItem::$date

Definition at line 45 of file Feed.php.

Referenced by __construct(), and getDate().

◆ $description

FeedItem::$description

Definition at line 43 of file Feed.php.

Referenced by __construct().

◆ $rssIsPermalink

FeedItem::$rssIsPermalink = false

Definition at line 49 of file Feed.php.

Referenced by setUniqueId().

◆ $title

Title FeedItem::$title

Definition at line 41 of file Feed.php.

Referenced by __construct().

◆ $uniqueId

FeedItem::$uniqueId

Definition at line 47 of file Feed.php.

Referenced by setUniqueId().

◆ $url

FeedItem::$url

Definition at line 44 of file Feed.php.

Referenced by __construct().


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