MediaWiki REL1_40
|
Inherits WatchedItemStoreInterface.
Public Member Functions | |
__construct (WatchedItemStoreInterface $actualStore) | |
Initially set WatchedItemStore that will be used in cases where writing is not needed. | |
addWatch (UserIdentity $user, $target, ?string $expiry=null) | |
addWatchBatchForUser (UserIdentity $user, array $targets, ?string $expiry=null) | |
clearUserWatchedItems (UserIdentity $user) | |
Synchronously clear the users watchlist. | |
clearUserWatchedItemsUsingJobQueue (UserIdentity $user) | |
Queues a job that will clear the users watchlist using the Job Queue. | |
countExpired () | |
Get the number of watchlist items that expire before the current time. | |
countUnreadNotifications (UserIdentity $user, $unreadLimit=null) | |
countVisitingWatchers ( $target, $threshold) | |
countVisitingWatchersMultiple (array $targetsWithVisitThresholds, $minimumWatchers=null) | |
countWatchedItems (UserIdentity $user) | |
Count the number of individual items that are watched by the user. | |
countWatchers ( $target) | |
countWatchersMultiple (array $targets, array $options=[]) | |
duplicateAllAssociatedEntries ( $oldTarget, $newTarget) | |
duplicateEntry ( $oldTarget, $newTarget) | |
getLatestNotificationTimestamp ( $timestamp, UserIdentity $user, $target) | |
getNotificationTimestampsBatch (UserIdentity $user, array $targets) | |
getWatchedItem (UserIdentity $user, $target) | |
getWatchedItemsForUser (UserIdentity $user, array $options=[]) | |
isTempWatched (UserIdentity $user, $target) | |
isWatched (UserIdentity $user, $target) | |
loadWatchedItem (UserIdentity $user, $target) | |
loadWatchedItemsBatch (UserIdentity $user, array $targets) | |
maybeEnqueueWatchlistExpiryJob () | |
Probabilistically add a job to purge the expired watchlist items, if watchlist expiration is enabled, based on the value of $wgWatchlistPurgeRate. | |
mustClearWatchedItemsUsingJobQueue (UserIdentity $user) | |
Does the size of the users watchlist require clearUserWatchedItemsUsingJobQueue() to be used instead of clearUserWatchedItems() | |
removeExpired (int $limit, bool $deleteOrphans=false) | |
Remove some number of expired watchlist items. | |
removeWatch (UserIdentity $user, $target) | |
removeWatchBatchForUser (UserIdentity $user, array $targets) | |
resetAllNotificationTimestampsForUser (UserIdentity $user, $timestamp=null) | |
Reset all watchlist notification timestamps for a user using the job queue. | |
resetNotificationTimestamp (UserIdentity $user, $title, $force='', $oldid=0) | |
setNotificationTimestampsForUser (UserIdentity $user, $timestamp, array $targets=[]) | |
updateNotificationTimestamp (UserIdentity $editor, $target, $timestamp) | |
Additional Inherited Members | |
Public Attributes inherited from WatchedItemStoreInterface | |
const | SORT_ASC = 'ASC' |
const | SORT_DESC = 'DESC' |
NoWriteWatchedItemStore::__construct | ( | WatchedItemStoreInterface | $actualStore | ) |
Initially set WatchedItemStore that will be used in cases where writing is not needed.
WatchedItemStoreInterface | $actualStore |
Definition at line 45 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::addWatch | ( | UserIdentity | $user, |
$target, | |||
?string | $expiry = null ) |
UserIdentity | $user | |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
string | null | $expiry |
Implements WatchedItemStoreInterface.
Definition at line 198 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::addWatchBatchForUser | ( | UserIdentity | $user, |
array | $targets, | ||
?string | $expiry = null ) |
UserIdentity | $user | |
LinkTarget[] | PageIdentity[] | $targets | deprecated passing LinkTarget[] since 1.36 |
string | null | $expiry | Optional expiry timestamp in any format acceptable to wfTimestamp(), null will not create expiries, or leave them unchanged should they already exist. |
Implements WatchedItemStoreInterface.
Definition at line 210 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::clearUserWatchedItems | ( | UserIdentity | $user | ) |
Synchronously clear the users watchlist.
UserIdentity | $user |
Implements WatchedItemStoreInterface.
Definition at line 274 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::clearUserWatchedItemsUsingJobQueue | ( | UserIdentity | $user | ) |
Queues a job that will clear the users watchlist using the Job Queue.
UserIdentity | $user |
Implements WatchedItemStoreInterface.
Definition at line 282 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countExpired | ( | ) |
Get the number of watchlist items that expire before the current time.
Implements WatchedItemStoreInterface.
Definition at line 311 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countUnreadNotifications | ( | UserIdentity | $user, |
$unreadLimit = null ) |
UserIdentity | $user | |
int | null | $unreadLimit |
Implements WatchedItemStoreInterface.
Definition at line 173 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countVisitingWatchers | ( | $target, | |
$threshold ) |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
mixed | $threshold |
MWException |
Implements WatchedItemStoreInterface.
Definition at line 67 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countVisitingWatchersMultiple | ( | array | $targetsWithVisitThresholds, |
$minimumWatchers = null ) |
array | $targetsWithVisitThresholds | array of pairs (LinkTarget|PageIdentity $target, mixed $threshold), $threshold is:
|
int | null | $minimumWatchers |
Implements WatchedItemStoreInterface.
Definition at line 102 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countWatchedItems | ( | UserIdentity | $user | ) |
Count the number of individual items that are watched by the user.
If a subject and corresponding talk page are watched this will return 2.
UserIdentity | $user |
Implements WatchedItemStoreInterface.
Definition at line 49 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countWatchers | ( | $target | ) |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 57 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countWatchersMultiple | ( | array | $targets, |
array | $options = [] ) |
LinkTarget[] | PageIdentity[] | $targets | deprecated passing LinkTarget[] since 1.36 |
array | $options | Allowed keys: 'minimumWatchers' => int |
Implements WatchedItemStoreInterface.
Definition at line 79 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::duplicateAllAssociatedEntries | ( | $oldTarget, | |
$newTarget ) |
LinkTarget | PageIdentity | $oldTarget | deprecated passing LinkTarget since 1.36 |
LinkTarget | PageIdentity | $newTarget | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 181 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::duplicateEntry | ( | $oldTarget, | |
$newTarget ) |
LinkTarget | PageIdentity | $oldTarget | deprecated passing LinkTarget since 1.36 |
LinkTarget | PageIdentity | $newTarget | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 189 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::getLatestNotificationTimestamp | ( | $timestamp, | |
UserIdentity | $user, | ||
$target ) |
string | null | $timestamp | |
UserIdentity | $user | |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 305 of file NoWriteWatchedItemStore.php.
References wfTimestampOrNull().
NoWriteWatchedItemStore::getNotificationTimestampsBatch | ( | UserIdentity | $user, |
array | $targets ) |
UserIdentity | $user | |
LinkTarget[] | PageIdentity[] | $targets | deprecated passing LinkTarget[] since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 169 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::getWatchedItem | ( | UserIdentity | $user, |
$target ) |
UserIdentity | $user | |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 117 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::getWatchedItemsForUser | ( | UserIdentity | $user, |
array | $options = [] ) |
UserIdentity | $user | |
array | $options | Allowed keys: 'forWrite' => bool defaults to false 'sort' => string optional sorting by namespace ID and title one of the self::SORT_* constants 'sortByExpiry' => bool optional sorts by expiration date, with the titles that will expire soonest at the top. |
Implements WatchedItemStoreInterface.
Definition at line 139 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::isTempWatched | ( | UserIdentity | $user, |
$target ) |
UserIdentity | $user | |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 157 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::isWatched | ( | UserIdentity | $user, |
$target ) |
UserIdentity | $user | |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 148 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::loadWatchedItem | ( | UserIdentity | $user, |
$target ) |
UserIdentity | $user | |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 126 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::loadWatchedItemsBatch | ( | UserIdentity | $user, |
array | $targets ) |
UserIdentity | $user | |
LinkTarget[] | PageIdentity[] | $targets | deprecated passing LinkTarget[] since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 135 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::maybeEnqueueWatchlistExpiryJob | ( | ) |
Probabilistically add a job to purge the expired watchlist items, if watchlist expiration is enabled, based on the value of $wgWatchlistPurgeRate.
Implements WatchedItemStoreInterface.
Definition at line 286 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::mustClearWatchedItemsUsingJobQueue | ( | UserIdentity | $user | ) |
Does the size of the users watchlist require clearUserWatchedItemsUsingJobQueue() to be used instead of clearUserWatchedItems()
UserIdentity | $user |
Implements WatchedItemStoreInterface.
Definition at line 278 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::removeExpired | ( | int | $limit, |
bool | $deleteOrphans = false ) |
Remove some number of expired watchlist items.
int | $limit | The number of items to remove. |
bool | $deleteOrphans | Whether to also delete watchlist_expiry rows that have no related watchlist rows (because not all code knows about the expiry table yet). This runs two extra queries, so is only done from the purgeExpiredWatchlistItems.php maintenance script. |
Implements WatchedItemStoreInterface.
Definition at line 315 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::removeWatch | ( | UserIdentity | $user, |
$target ) |
UserIdentity | $user | |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 223 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::removeWatchBatchForUser | ( | UserIdentity | $user, |
array | $targets ) |
UserIdentity | $user | |
LinkTarget[] | PageIdentity[] | $targets | deprecated passing LinkTarget[] since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 295 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::resetAllNotificationTimestampsForUser | ( | UserIdentity | $user, |
$timestamp = null ) |
Reset all watchlist notification timestamps for a user using the job queue.
UserIdentity | $user | The user to reset the timestamps for |
string | int | null | $timestamp | Value to set all timestamps to, null to clear them |
Implements WatchedItemStoreInterface.
Definition at line 254 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::resetNotificationTimestamp | ( | UserIdentity | $user, |
$title, | |||
$force = '', | |||
$oldid = 0 ) |
UserIdentity | $user | |
LinkTarget | PageIdentity | $title | deprecated passing LinkTarget since 1.36 |
string | $force | |
int | $oldid |
Implements WatchedItemStoreInterface.
Definition at line 265 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::setNotificationTimestampsForUser | ( | UserIdentity | $user, |
$timestamp, | |||
array | $targets = [] ) |
UserIdentity | $user | The user to set the timestamps for |
string | null | $timestamp | Set the update timestamp to this value |
LinkTarget[] | PageIdentity[] | $targets | List of targets to update. Default to all targets. deprecated passing LinkTarget[] since 1.36 |
Implements WatchedItemStoreInterface.
Definition at line 234 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::updateNotificationTimestamp | ( | UserIdentity | $editor, |
$target, | |||
$timestamp ) |
UserIdentity | $editor | |
LinkTarget | PageIdentity | $target | deprecated passing LinkTarget since 1.36 |
string | $timestamp |
Implements WatchedItemStoreInterface.
Definition at line 248 of file NoWriteWatchedItemStore.php.