113 array $targetsWithVisitThresholds,
114 $minimumWatchers =
null
428 public function removeExpired(
int $limit,
bool $deleteOrphans =
false ): void;
Interface for objects (potentially) representing an editable wiki page.
isTempWatched(UserIdentity $user, $target)
Whether the page is only being watched temporarily (has expiry).
countWatchersMultiple(array $targets, array $options=[])
getWatchedItem(UserIdentity $user, $target)
Get an item (may be cached)
loadWatchedItem(UserIdentity $user, $target)
Loads an item from the db.
removeWatchBatchForUser(UserIdentity $user, array $targets)
maybeEnqueueWatchlistExpiryJob()
Probabilistically add a job to purge the expired watchlist items, if watchlist expiration is enabled,...
removeExpired(int $limit, bool $deleteOrphans=false)
Remove some number of expired watchlist items.
countVisitingWatchersMultiple(array $targetsWithVisitThresholds, $minimumWatchers=null)
Number of watchers of each page who have visited recent edits to that page.
getWatchedItemsForUser(UserIdentity $user, array $options=[])
countExpired()
Get the number of watchlist items that expire before the current time.
countUnreadNotifications(UserIdentity $user, $unreadLimit=null)
clearUserWatchedItemsUsingJobQueue(UserIdentity $user)
Queues a job that will clear the users watchlist using the Job Queue.
addWatchBatchForUser(UserIdentity $user, array $targets, ?string $expiry=null)
addWatch(UserIdentity $user, $target, ?string $expiry=null)
Must be called separately for Subject & Talk namespaces.
resetNotificationTimestamp(UserIdentity $user, $title, $force='', $oldid=0)
Reset the notification timestamp of this entry.
countWatchedItems(UserIdentity $user)
Count the number of individual items that are watched by the user.
clearUserWatchedItems(UserIdentity $user)
Synchronously clear the users watchlist.
isWatched(UserIdentity $user, $target)
Must be called separately for Subject & Talk namespaces.
countVisitingWatchers( $target, $threshold)
Number of page watchers who also visited a "recent" edit.
mustClearWatchedItemsUsingJobQueue(UserIdentity $user)
Does the size of the users watchlist require clearUserWatchedItemsUsingJobQueue() to be used instead ...
loadWatchedItemsBatch(UserIdentity $user, array $targets)
Loads a set of WatchedItems from the db.
duplicateEntry( $oldTarget, $newTarget)
Check if the given title already is watched by the user, and if so add a watch for the new title.
updateNotificationTimestamp(UserIdentity $editor, $target, $timestamp)
duplicateAllAssociatedEntries( $oldTarget, $newTarget)
Check if the given title already is watched by the user, and if so add a watch for the new title.
removeWatch(UserIdentity $user, $target)
Removes an entry for the UserIdentity watching the target (LinkTarget or PageIdentity) Must be called...
setNotificationTimestampsForUser(UserIdentity $user, $timestamp, array $targets=[])
getNotificationTimestampsBatch(UserIdentity $user, array $targets)
getLatestNotificationTimestamp( $timestamp, UserIdentity $user, $target)
Convert $timestamp to TS_MW or return null if the page was visited since then by $user.
resetAllNotificationTimestampsForUser(UserIdentity $user, $timestamp=null)
Reset all watchlist notification timestamps for a user using the job queue.