MediaWiki  REL1_19
ChangesFeed Class Reference

Feed to Special:RecentChanges and Special:RecentChangesLiked. More...

List of all members.

Public Member Functions

 __construct ($format, $type)
 Constructor.
 execute ($feed, $rows, $lastmod, $opts)
 Generates feed's content.
 getFeedObject ($title, $description, $url)
 Get a ChannelFeed subclass object to use.
 loadFromCache ($lastmod, $timekey, $key)
 Try to load the feed result from $messageMemc.
 saveToCache ($feed, $timekey, $key)
 Save to feed result to $messageMemc.

Static Public Member Functions

static generateFeed ($rows, &$feed)
 Generate the feed items given a row from the database.

Public Attributes

 $descMsg
 $format
 $titleMsg
 $type

Detailed Description

Feed to Special:RecentChanges and Special:RecentChangesLiked.

Definition at line 8 of file ChangesFeed.php.


Constructor & Destructor Documentation

ChangesFeed::__construct ( format,
type 
)

Constructor.

Parameters:
$formatString: feed's format (either 'rss' or 'atom')
$typeString: type of feed (for cache keys)

Definition at line 17 of file ChangesFeed.php.

References $format, and $type.


Member Function Documentation

ChangesFeed::execute ( feed,
rows,
lastmod,
opts 
)

Generates feed's content.

Parameters:
$feedChannelFeed subclass object (generally the one returned by getFeedObject())
$rowsResultWrapper object with rows in recentchanges table
$lastmodInteger: timestamp of the last item in the recentchanges table (only used for the cache key)
$optsFormOptions as in SpecialRecentChanges::getDefaultOptions()
Returns:
null or true

Definition at line 56 of file ChangesFeed.php.

References $rows, $wgLang, $wgRenderHashAppend, FeedUtils\checkFeedOutput(), FeedUtils\checkPurge(), echo, generateFeed(), loadFromCache(), saveToCache(), wfDebug(), and wfMemcKey().

Here is the call graph for this function:

static ChangesFeed::generateFeed ( rows,
&$  feed 
) [static]

Generate the feed items given a row from the database.

Parameters:
$rowsDatabaseBase resource with recentchanges rows
$feedFeed object

Definition at line 147 of file ChangesFeed.php.

References $n, $rows, $title, $url, MWNamespace\canTalk(), Revision\DELETED_USER, FeedUtils\formatDiff(), Title\makeTitle(), wfMsgHtml(), wfProfileIn(), and wfProfileOut().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

ChangesFeed::getFeedObject ( title,
description,
url 
)

Get a ChannelFeed subclass object to use.

Parameters:
$titleString: feed's title
$descriptionString: feed's description
$urlString: url of origin page
Returns:
ChannelFeed subclass or false on failure

Definition at line 30 of file ChangesFeed.php.

References $url, $wgFeedClasses, $wgLanguageCode, and $wgSitename.

ChangesFeed::loadFromCache ( lastmod,
timekey,
key 
)

Try to load the feed result from $messageMemc.

Parameters:
$lastmodInteger: timestamp of the last item in the recentchanges table
$timekeyString: memcached key of the last modification
$keyString: memcached key of the content
Returns:
feed's content on cache hit or false on cache miss

Definition at line 112 of file ChangesFeed.php.

References $messageMemc, $wgFeedCacheTimeout, $wgOut, wfDebug(), and wfTimestamp().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

ChangesFeed::saveToCache ( feed,
timekey,
key 
)

Save to feed result to $messageMemc.

Parameters:
$feedString: feed's content
$timekeyString: memcached key of the last modification
$keyString: memcached key of the content

Definition at line 97 of file ChangesFeed.php.

References $messageMemc, and wfTimestamp().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

ChangesFeed::$descMsg

Definition at line 9 of file ChangesFeed.php.

ChangesFeed::$format

Definition at line 9 of file ChangesFeed.php.

Referenced by __construct().

ChangesFeed::$titleMsg

Definition at line 9 of file ChangesFeed.php.

ChangesFeed::$type

Definition at line 9 of file ChangesFeed.php.

Referenced by __construct().


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