MediaWiki REL1_34
|
Public Member Functions | |
addWatch (UserIdentity $user, LinkTarget $target) | |
Must be called separately for Subject & Talk namespaces. | |
addWatchBatchForUser (UserIdentity $user, array $targets) | |
clearUserWatchedItems (UserIdentity $user) | |
Queues a job that will clear the users watchlist using the Job Queue. | |
clearUserWatchedItemsUsingJobQueue (UserIdentity $user) | |
Queues a job that will clear the users watchlist using the Job Queue. | |
countUnreadNotifications (UserIdentity $user, $unreadLimit=null) | |
countVisitingWatchers (LinkTarget $target, $threshold) | |
Number of page watchers who also visited a "recent" edit. | |
countVisitingWatchersMultiple (array $targetsWithVisitThresholds, $minimumWatchers=null) | |
Number of watchers of each page who have visited recent edits to that page. | |
countWatchedItems (UserIdentity $user) | |
Count the number of individual items that are watched by the user. | |
countWatchers (LinkTarget $target) | |
countWatchersMultiple (array $targets, array $options=[]) | |
duplicateAllAssociatedEntries (LinkTarget $oldTarget, LinkTarget $newTarget) | |
Check if the given title already is watched by the user, and if so add a watch for the new title. | |
duplicateEntry (LinkTarget $oldTarget, LinkTarget $newTarget) | |
Check if the given title already is watched by the user, and if so add a watch for the new title. | |
getLatestNotificationTimestamp ( $timestamp, UserIdentity $user, LinkTarget $target) | |
Convert $timestamp to TS_MW or return null if the page was visited since then by $user. | |
getNotificationTimestampsBatch (UserIdentity $user, array $targets) | |
getWatchedItem (UserIdentity $user, LinkTarget $target) | |
Get an item (may be cached) | |
getWatchedItemsForUser (UserIdentity $user, array $options=[]) | |
isWatched (UserIdentity $user, LinkTarget $target) | |
Must be called separately for Subject & Talk namespaces. | |
loadWatchedItem (UserIdentity $user, LinkTarget $target) | |
Loads an item from the db. | |
removeWatch (UserIdentity $user, LinkTarget $target) | |
Removes an entry for the UserIdentity watching the LinkTarget Must be called separately for Subject & Talk namespaces. | |
removeWatchBatchForUser (UserIdentity $user, array $targets) | |
resetAllNotificationTimestampsForUser (UserIdentity $user) | |
Reset all watchlist notificaton timestamps for a user using the job queue. | |
resetNotificationTimestamp (UserIdentity $user, LinkTarget $title, $force='', $oldid=0) | |
Reset the notification timestamp of this entry. | |
setNotificationTimestampsForUser (UserIdentity $user, $timestamp, array $targets=[]) | |
updateNotificationTimestamp (UserIdentity $editor, LinkTarget $target, $timestamp) | |
Public Attributes | |
const | SORT_ASC = 'ASC' |
const | SORT_DESC = 'DESC' |
Definition at line 30 of file WatchedItemStoreInterface.php.
WatchedItemStoreInterface::addWatch | ( | UserIdentity | $user, |
LinkTarget | $target | ||
) |
Must be called separately for Subject & Talk namespaces.
UserIdentity | $user | |
LinkTarget | $target |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::addWatchBatchForUser | ( | UserIdentity | $user, |
array | $targets | ||
) |
UserIdentity | $user | |
LinkTarget[] | $targets |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::clearUserWatchedItems | ( | UserIdentity | $user | ) |
Queues a job that will clear the users watchlist using the Job Queue.
UserIdentity | $user |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::clearUserWatchedItemsUsingJobQueue | ( | UserIdentity | $user | ) |
Queues a job that will clear the users watchlist using the Job Queue.
UserIdentity | $user |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::countUnreadNotifications | ( | UserIdentity | $user, |
$unreadLimit = null |
|||
) |
UserIdentity | $user | |
int | null | $unreadLimit |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::countVisitingWatchers | ( | LinkTarget | $target, |
$threshold | |||
) |
Number of page watchers who also visited a "recent" edit.
LinkTarget | $target | |
mixed | $threshold | timestamp accepted by wfTimestamp |
DBUnexpectedError | |
MWException |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::countVisitingWatchersMultiple | ( | array | $targetsWithVisitThresholds, |
$minimumWatchers = null |
|||
) |
Number of watchers of each page who have visited recent edits to that page.
array | $targetsWithVisitThresholds | array of pairs (LinkTarget $target, mixed $threshold), $threshold is:
|
int | null | $minimumWatchers |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::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 |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::countWatchers | ( | LinkTarget | $target | ) |
LinkTarget | $target |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::countWatchersMultiple | ( | array | $targets, |
array | $options = [] |
||
) |
LinkTarget[] | $targets | |
array | $options | Allowed keys: 'minimumWatchers' => int |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::duplicateAllAssociatedEntries | ( | LinkTarget | $oldTarget, |
LinkTarget | $newTarget | ||
) |
Check if the given title already is watched by the user, and if so add a watch for the new title.
To be used for page renames and such.
LinkTarget | $oldTarget | |
LinkTarget | $newTarget |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::duplicateEntry | ( | LinkTarget | $oldTarget, |
LinkTarget | $newTarget | ||
) |
Check if the given title already is watched by the user, and if so add a watch for the new title.
To be used for page renames and such. This must be called separately for Subject and Talk pages
LinkTarget | $oldTarget | |
LinkTarget | $newTarget |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::getLatestNotificationTimestamp | ( | $timestamp, | |
UserIdentity | $user, | ||
LinkTarget | $target | ||
) |
Convert $timestamp to TS_MW or return null if the page was visited since then by $user.
Use this only on single-user methods (having higher read-after-write expectations) and not in places involving arbitrary batches of different users
Usage of this method should be limited to WatchedItem* classes
string | null | $timestamp | Value of wl_notificationtimestamp from the DB |
UserIdentity | $user | |
LinkTarget | $target |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::getNotificationTimestampsBatch | ( | UserIdentity | $user, |
array | $targets | ||
) |
UserIdentity | $user | |
LinkTarget[] | $targets |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::getWatchedItem | ( | UserIdentity | $user, |
LinkTarget | $target | ||
) |
Get an item (may be cached)
UserIdentity | $user | |
LinkTarget | $target |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::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 |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::isWatched | ( | UserIdentity | $user, |
LinkTarget | $target | ||
) |
Must be called separately for Subject & Talk namespaces.
UserIdentity | $user | |
LinkTarget | $target |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::loadWatchedItem | ( | UserIdentity | $user, |
LinkTarget | $target | ||
) |
Loads an item from the db.
UserIdentity | $user | |
LinkTarget | $target |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::removeWatch | ( | UserIdentity | $user, |
LinkTarget | $target | ||
) |
Removes an entry for the UserIdentity watching the LinkTarget Must be called separately for Subject & Talk namespaces.
UserIdentity | $user | |
LinkTarget | $target |
DBUnexpectedError | |
MWException |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::removeWatchBatchForUser | ( | UserIdentity | $user, |
array | $targets | ||
) |
UserIdentity | $user | |
LinkTarget[] | $targets |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::resetAllNotificationTimestampsForUser | ( | UserIdentity | $user | ) |
Reset all watchlist notificaton timestamps for a user using the job queue.
UserIdentity | $user | The user to reset the timestamps for |
Implemented in NoWriteWatchedItemStore.
WatchedItemStoreInterface::resetNotificationTimestamp | ( | UserIdentity | $user, |
LinkTarget | $title, | ||
$force = '' , |
|||
$oldid = 0 |
|||
) |
Reset the notification timestamp of this entry.
UserIdentity | $user | |
LinkTarget | $title | |
string | $force | Whether to force the write query to be executed even if the page is not watched or the notification timestamp is already NULL. 'force' in order to force |
int | $oldid | The revision id being viewed. If not given or 0, latest revision is assumed. |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::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[] | $targets | List of targets to update. Default to all targets |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
WatchedItemStoreInterface::updateNotificationTimestamp | ( | UserIdentity | $editor, |
LinkTarget | $target, | ||
$timestamp | |||
) |
UserIdentity | $editor | The editor that triggered the update. Their notification timestamp will not be updated(they have already seen it) |
LinkTarget | $target | The target to update timestamps for |
string | $timestamp | Set the update (first unseen revision) timestamp to this value |
Implemented in NoWriteWatchedItemStore, and WatchedItemStore.
const WatchedItemStoreInterface::SORT_ASC = 'ASC' |
Definition at line 35 of file WatchedItemStoreInterface.php.
Referenced by SpecialEditWatchlist\getWatchlistInfo(), and ApiQueryWatchlistRaw\run().
const WatchedItemStoreInterface::SORT_DESC = 'DESC' |
Definition at line 40 of file WatchedItemStoreInterface.php.
Referenced by ApiQueryWatchlistRaw\run().