MediaWiki
master
|
Public Member Functions | |
__construct (LoadBalancer $loadBalancer) | |
getWatchedItemsForUser (User $user, array $options=[]) | |
For simple listing of user's watchlist items, see WatchedItemStore::getWatchedItemsForUser. More... | |
getWatchedItemsWithRecentChangeInfo (User $user, array $options=[]) | |
Public Attributes | |
const | DIR_NEWER = 'newer' |
const | DIR_OLDER = 'older' |
const | FILTER_ANON = 'anon' |
const | FILTER_BOT = 'bot' |
const | FILTER_CHANGED = 'changed' |
const | FILTER_MINOR = 'minor' |
const | FILTER_NOT_ANON = '!anon' |
const | FILTER_NOT_BOT = '!bot' |
const | FILTER_NOT_CHANGED = '!changed' |
const | FILTER_NOT_MINOR = '!minor' |
const | FILTER_NOT_PATROLLED = '!patrolled' |
const | FILTER_NOT_UNREAD = '!unread' |
const | FILTER_PATROLLED = 'patrolled' |
const | FILTER_UNREAD = 'unread' |
const | INCLUDE_COMMENT = 'comment' |
const | INCLUDE_FLAGS = 'flags' |
const | INCLUDE_LOG_INFO = 'loginfo' |
const | INCLUDE_PATROL_INFO = 'patrol' |
const | INCLUDE_SIZES = 'sizes' |
const | INCLUDE_USER = 'user' |
const | INCLUDE_USER_ID = 'userid' |
const | SORT_ASC = 'ASC' |
const | SORT_DESC = 'DESC' |
Private Attributes | |
LoadBalancer | $loadBalancer |
Definition at line 16 of file WatchedItemQueryService.php.
WatchedItemQueryService::__construct | ( | LoadBalancer | $loadBalancer | ) |
Definition at line 53 of file WatchedItemQueryService.php.
References $loadBalancer.
|
private |
MWException |
Definition at line 61 of file WatchedItemQueryService.php.
References DB_SLAVE.
Referenced by getWatchedItemsForUser(), and getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 494 of file WatchedItemQueryService.php.
References DatabaseBase\bitAnd(), LogPage\DELETED_ACTION, LogPage\DELETED_RESTRICTED, User\isAllowed(), User\isAllowedAny(), LIST_OR, DatabaseBase\makeList(), and RC_LOG.
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
Creates a query condition part for getting only items before or after the given link target (while ordering using $sort mode)
DatabaseBase | $db | |
LinkTarget | $target | |
string | $op | comparison operator to use in the conditions |
Definition at line 571 of file WatchedItemQueryService.php.
References DatabaseBase\addQuotes(), MediaWiki\Linker\LinkTarget\getDBkey(), MediaWiki\Linker\LinkTarget\getNamespace(), LIST_AND, LIST_OR, and DatabaseBase\makeList().
Referenced by getWatchedItemsForUserQueryConds().
|
private |
Definition at line 276 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 448 of file WatchedItemQueryService.php.
References DatabaseBase\addQuotes().
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
Definition at line 512 of file WatchedItemQueryService.php.
References DatabaseBase\addQuotes(), list, LIST_AND, LIST_OR, DatabaseBase\makeList(), and DatabaseBase\timestamp().
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
Definition at line 467 of file WatchedItemQueryService.php.
References DatabaseBase\addQuotes(), DatabaseBase\bitAnd(), Revision\DELETED_RESTRICTED, Revision\DELETED_USER, User\isAllowed(), and User\isAllowedAny().
Referenced by getWatchedItemsWithRCInfoQueryConds().
For simple listing of user's watchlist items, see WatchedItemStore::getWatchedItemsForUser.
User | $user | |
array | $options | Allowed keys: 'sort' => string optional sorting by namespace ID and title one of the self::SORT_* constants 'namespaceIds' => int[] optional namespace IDs to filter by (defaults to all namespaces) 'limit' => int maximum number of items to return 'filter' => string optional filter, one of the self::FILTER_* contants 'from' => LinkTarget requires 'sort' key, only return items starting from those related to the link target 'until' => LinkTarget requires 'sort' key, only return items until those related to the link target 'startFrom' => LinkTarget requires 'sort' key, only return items starting from those related to the link target, allows to skip some link targets specified using the form option |
Definition at line 220 of file WatchedItemQueryService.php.
References $options, $res, as, getConnection(), getWatchedItemsForUserQueryConds(), getWatchedItemsForUserQueryDbOptions(), User\isAnon(), and reuseConnection().
|
private |
Definition at line 532 of file WatchedItemQueryService.php.
References getFromUntilTargetConds(), and User\getId().
Referenced by getWatchedItemsForUser().
|
private |
Definition at line 602 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsForUser().
|
private |
Definition at line 339 of file WatchedItemQueryService.php.
References getExtraDeletedPageLogEntryRelatedCond(), getStartEndConds(), getStartFromConds(), IDatabase\getType(), getUserRelatedConds(), getWatchedItemsWithRCInfoQueryFilterConds(), getWatchlistOwnerId(), LIST_OR, DatabaseBase\makeList(), and RC_LOG.
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 587 of file WatchedItemQueryService.php.
References $sort.
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 289 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 407 of file WatchedItemQueryService.php.
References User\useNPPatrol(), and User\useRCPatrol().
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
Definition at line 619 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsWithRecentChangeInfo().
User | $user | |
array | $options | Allowed keys: 'includeFields' => string[] RecentChange fields to be included in the result, self::INCLUDE_* constants should be used 'filters' => string[] optional filters to narrow down resulted items 'namespaceIds' => int[] optional namespace IDs to filter by (defaults to all namespaces) 'allRevisions' => bool return multiple revisions of the same page if true, only the most recent if false (default) 'rcTypes' => int[] which types of RecentChanges to include (defaults to all types), allowed values: RC_EDIT, RC_NEW, RC_LOG, RC_EXTERNAL, RC_CATEGORIZE 'onlyByUser' => string only list changes by a specified user 'notByUser' => string do not incluide changes by a specified user 'dir' => string in which direction to enumerate, accepted values:
|
Definition at line 118 of file WatchedItemQueryService.php.
References $options, $res, $tables, as, class, false, getConnection(), getRecentChangeFieldsFromRow(), getWatchedItemsWithRCInfoQueryConds(), getWatchedItemsWithRCInfoQueryDbOptions(), getWatchedItemsWithRCInfoQueryFields(), getWatchedItemsWithRCInfoQueryJoinConds(), RC_CATEGORIZE, RC_EDIT, RC_EXTERNAL, RC_LOG, RC_NEW, and reuseConnection().
Definition at line 390 of file WatchedItemQueryService.php.
References User\getId().
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
DatabaseBase | $connection |
MWException |
Definition at line 69 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsForUser(), and getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 51 of file WatchedItemQueryService.php.
Referenced by __construct().
const WatchedItemQueryService::DIR_NEWER = 'newer' |
Definition at line 19 of file WatchedItemQueryService.php.
Referenced by WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider(), and ApiQueryWatchlist\run().
const WatchedItemQueryService::DIR_OLDER = 'older' |
Definition at line 18 of file WatchedItemQueryService.php.
Referenced by WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoInvalidOptionsProvider(), WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider(), WatchedItemQueryServiceUnitTest\mysqlIndexOptimizationProvider(), and ApiQueryWatchlist\run().
const WatchedItemQueryService::FILTER_ANON = 'anon' |
const WatchedItemQueryService::FILTER_BOT = 'bot' |
const WatchedItemQueryService::FILTER_CHANGED = 'changed' |
const WatchedItemQueryService::FILTER_MINOR = 'minor' |
const WatchedItemQueryService::FILTER_NOT_ANON = '!anon' |
const WatchedItemQueryService::FILTER_NOT_BOT = '!bot' |
const WatchedItemQueryService::FILTER_NOT_CHANGED = '!changed' |
const WatchedItemQueryService::FILTER_NOT_MINOR = '!minor' |
const WatchedItemQueryService::FILTER_NOT_PATROLLED = '!patrolled' |
Definition at line 39 of file WatchedItemQueryService.php.
Referenced by WatchedItemQueryServiceUnitTest\filterPatrolledOptionProvider(), ApiQueryWatchlist\getAllowedParams(), WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider(), ApiQueryWatchlist\run(), ApiQueryWatchlist\showParamsConflicting(), and ApiQueryWatchlistIntegrationTest\testShowPatrolledParams().
const WatchedItemQueryService::FILTER_NOT_UNREAD = '!unread' |
Definition at line 41 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getAllowedParams(), WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider(), ApiQueryWatchlist\showParamsConflicting(), and ApiQueryWatchlistIntegrationTest\testShowUnreadParams().
const WatchedItemQueryService::FILTER_PATROLLED = 'patrolled' |
Definition at line 38 of file WatchedItemQueryService.php.
Referenced by WatchedItemQueryServiceUnitTest\filterPatrolledOptionProvider(), ApiQueryWatchlist\getAllowedParams(), WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider(), ApiQueryWatchlist\run(), ApiQueryWatchlist\showParamsConflicting(), and ApiQueryWatchlistIntegrationTest\testShowPatrolledParams().
const WatchedItemQueryService::FILTER_UNREAD = 'unread' |
Definition at line 40 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getAllowedParams(), WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider(), ApiQueryWatchlist\showParamsConflicting(), and ApiQueryWatchlistIntegrationTest\testShowUnreadParams().
const WatchedItemQueryService::INCLUDE_COMMENT = 'comment' |
Definition at line 24 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getFieldsToInclude(), and WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider().
const WatchedItemQueryService::INCLUDE_FLAGS = 'flags' |
Definition at line 21 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getFieldsToInclude(), and WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider().
const WatchedItemQueryService::INCLUDE_LOG_INFO = 'loginfo' |
Definition at line 27 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getFieldsToInclude(), and WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider().
const WatchedItemQueryService::INCLUDE_PATROL_INFO = 'patrol' |
Definition at line 25 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getFieldsToInclude(), and WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider().
const WatchedItemQueryService::INCLUDE_SIZES = 'sizes' |
Definition at line 26 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getFieldsToInclude(), and WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider().
const WatchedItemQueryService::INCLUDE_USER = 'user' |
Definition at line 22 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getFieldsToInclude(), and WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider().
const WatchedItemQueryService::INCLUDE_USER_ID = 'userid' |
Definition at line 23 of file WatchedItemQueryService.php.
Referenced by ApiQueryWatchlist\getFieldsToInclude(), and WatchedItemQueryServiceUnitTest\getWatchedItemsWithRecentChangeInfoOptionsProvider().
const WatchedItemQueryService::SORT_ASC = 'ASC' |
Definition at line 45 of file WatchedItemQueryService.php.
Referenced by WatchedItemQueryServiceUnitTest\provideGetWatchedItemsForUser_fromUntilStartFromOptions(), and WatchedItemQueryServiceUnitTest\provideGetWatchedItemsForUserOptions().
const WatchedItemQueryService::SORT_DESC = 'DESC' |
Definition at line 46 of file WatchedItemQueryService.php.
Referenced by WatchedItemQueryServiceUnitTest\provideGetWatchedItemsForUser_fromUntilStartFromOptions(), and WatchedItemQueryServiceUnitTest\provideGetWatchedItemsForUserOptions().