ChangesFeed Class Reference
[Feed]

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

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

 $format
 $type
 $titleMsg
 $descMsg


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:
$format String: feed's format (either 'rss' or 'atom')
$type String: 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:
$feed ChannelFeed subclass object (generally the one returned by getFeedObject())
$rows ResultWrapper object with rows in recentchanges table
$lastmod Integer: timestamp of the last item in the recentchanges table (only used for the cache key)
$opts FormOptions as in SpecialRecentChanges::getDefaultOptions()
Returns:
null or true

Definition at line 47 of file ChangesFeed.php.

References $messageMemc, $rows, $wgFeedCacheTimeout, $wgLang, $wgSitename, FeedUtils::checkFeedOutput(), FeedUtils::checkPurge(), generateFeed(), loadFromCache(), saveToCache(), wfDebug(), and wfMemcKey().

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

Generate the feed items given a row from the database.

Parameters:
$rows DatabaseBase resource with recentchanges rows
$feed Feed object

Definition at line 135 of file ChangesFeed.php.

References $n, $rows, $title, Revision::DELETED_USER, FeedUtils::formatDiff(), Title::makeTitle(), wfMsgHtml(), wfProfileIn(), and wfProfileOut().

Referenced by execute().

ChangesFeed::getFeedObject ( title,
description 
)

Get a ChannelFeed subclass object to use.

Parameters:
$title String: feed's title
$description String: feed's description
Returns:
ChannelFeed subclass or false on failure

Definition at line 29 of file ChangesFeed.php.

References $wgContLanguageCode, $wgFeedClasses, $wgSitename, and $wgTitle.

ChangesFeed::loadFromCache ( lastmod,
timekey,
key 
)

Try to load the feed result from $messageMemc.

Parameters:
$lastmod Integer: timestamp of the last item in the recentchanges table
$timekey String: memcached key of the last modification
$key String: memcached key of the content
Returns:
feed's content on cache hit or false on cache miss

Definition at line 104 of file ChangesFeed.php.

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

Referenced by execute().

ChangesFeed::saveToCache ( feed,
timekey,
key 
)

Save to feed result to $messageMemc.

Parameters:
$feed String: feed's content
$timekey String: memcached key of the last modification
$key String: memcached key of the content

Definition at line 89 of file ChangesFeed.php.

References $messageMemc, and wfTimestamp().

Referenced by execute().


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:

Generated on Sat Apr 30 22:57:33 2011 for MediaWiki by  doxygen 1.5.9