Merge "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git] / includes / WatchedItemQueryServiceExtension.php
1 <?php
2
3 /**
4 * Extension mechanism for WatchedItemQueryService
5 *
6 * @since 1.29
7 *
8 * @file
9 * @ingroup Watchlist
10 *
11 * @license GNU GPL v2+
12 */
13 interface WatchedItemQueryServiceExtension {
14
15 /**
16 * Modify the WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
17 * query before it's made.
18 *
19 * @warning Any joins added *must* join on a unique key of the target table
20 * unless you really know what you're doing.
21 * @param User $user
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()
30 */
31 public function modifyWatchedItemsWithRCInfoQuery( User $user, array $options, IDatabase $db,
32 array &$tables, array &$fields, array &$conds, array &$dbOptions, array &$joinConds
33 );
34
35 /**
36 * Modify the results from WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
37 * before they're returned.
38 *
39 * @param User $user
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
48 * removed.
49 */
50 public function modifyWatchedItemsWithRCInfo( User $user, array $options, IDatabase $db,
51 array &$items, $res, &$startFrom
52 );
53
54 }