4 * Extension mechanism for WatchedItemQueryService
11 * @license GNU GPL v2+
13 interface WatchedItemQueryServiceExtension
{
16 * Modify the WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
17 * query before it's made.
19 * @warning Any joins added *must* join on a unique key of the target table
20 * unless you really know what you're doing.
22 * @param array $options Options from
23 * WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
24 * @param IDatabase $db Database connection being used for the query
25 * @param array &$tables Tables for Database::select()
26 * @param array &$fields Fields for Database::select()
27 * @param array &$conds Conditions for Database::select()
28 * @param array &$dbOptions Options for Database::select()
29 * @param array &$joinConds Join conditions for Database::select()
31 public function modifyWatchedItemsWithRCInfoQuery( User
$user, array $options, IDatabase
$db,
32 array &$tables, array &$fields, array &$conds, array &$dbOptions, array &$joinConds
36 * Modify the results from WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
37 * before they're returned.
40 * @param array $options Options from
41 * WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
42 * @param IDatabase $db Database connection being used for the query
43 * @param array &$items array of pairs ( WatchedItem $watchedItem, string[] $recentChangeInfo ).
44 * May be truncated if necessary, in which case $startFrom must be updated.
45 * @param ResultWrapper|bool $res Database query result
46 * @param array|null &$startFrom Continuation value. If you truncate $items, set this to
47 * [ $recentChangeInfo['rc_timestamp'], $recentChangeInfo['rc_id'] ] from the first item
50 public function modifyWatchedItemsWithRCInfo( User
$user, array $options, IDatabase
$db,
51 array &$items, $res, &$startFrom