MediaWiki REL1_31
|
Public Member Functions | |
__construct (WatchedItemStoreInterface $actualStore) | |
Initialy set WatchedItemStore that will be used in cases where writing is not needed. | |
addWatch (User $user, LinkTarget $target) | |
Must be called separately for Subject & Talk namespaces. | |
addWatchBatchForUser (User $user, array $targets) | |
clearUserWatchedItems (User $user) | |
Queues a job that will clear the users watchlist using the Job Queue. | |
clearUserWatchedItemsUsingJobQueue (User $user) | |
Queues a job that will clear the users watchlist using the Job Queue. | |
countUnreadNotifications (User $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 (User $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. | |
getNotificationTimestampsBatch (User $user, array $targets) | |
getWatchedItem (User $user, LinkTarget $target) | |
Get an item (may be cached) | |
getWatchedItemsForUser (User $user, array $options=[]) | |
isWatched (User $user, LinkTarget $target) | |
Must be called separately for Subject & Talk namespaces. | |
loadWatchedItem (User $user, LinkTarget $target) | |
Loads an item from the db. | |
removeWatch (User $user, LinkTarget $target) | |
Removes the an entry for the User watching the LinkTarget Must be called separately for Subject & Talk namespaces. | |
resetAllNotificationTimestampsForUser (User $user) | |
Reset all watchlist notificaton timestamps for a user using the job queue. | |
resetNotificationTimestamp (User $user, Title $title, $force='', $oldid=0) | |
Reset the notification timestamp of this entry. | |
setNotificationTimestampsForUser (User $user, $timestamp, array $targets=[]) | |
updateNotificationTimestamp (User $editor, LinkTarget $target, $timestamp) | |
Private Attributes | |
WatchedItemStoreInterface | $actualStore |
Additional Inherited Members | |
Public Attributes inherited from WatchedItemStoreInterface | |
const | SORT_ASC = 'ASC' |
const | SORT_DESC = 'DESC' |
Definition at line 28 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::__construct | ( | WatchedItemStoreInterface | $actualStore | ) |
Initialy set WatchedItemStore that will be used in cases where writing is not needed.
WatchedItemStoreInterface | $actualStore |
Definition at line 39 of file NoWriteWatchedItemStore.php.
References $actualStore.
NoWriteWatchedItemStore::addWatch | ( | User | $user, |
LinkTarget | $target ) |
Must be called separately for Subject & Talk namespaces.
User | $user | |
LinkTarget | $target |
Implements WatchedItemStoreInterface.
Definition at line 101 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::addWatchBatchForUser | ( | User | $user, |
array | $targets ) |
User | $user | |
LinkTarget[] | $targets |
Implements WatchedItemStoreInterface.
Definition at line 105 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::clearUserWatchedItems | ( | User | $user | ) |
Queues a job that will clear the users watchlist using the Job Queue.
User | $user |
Implements WatchedItemStoreInterface.
Definition at line 138 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::clearUserWatchedItemsUsingJobQueue | ( | User | $user | ) |
Queues a job that will clear the users watchlist using the Job Queue.
User | $user |
Implements WatchedItemStoreInterface.
Definition at line 142 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countUnreadNotifications | ( | User | $user, |
$unreadLimit = null ) |
User | $user | |
int | $unreadLimit |
Implements WatchedItemStoreInterface.
Definition at line 89 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countVisitingWatchers | ( | LinkTarget | $target, |
$threshold ) |
Number of page watchers who also visited a "recent" edit.
LinkTarget | $target | |
mixed | $threshold | timestamp accepted by wfTimestamp |
DBUnexpectedError | |
MWException |
Implements WatchedItemStoreInterface.
Definition at line 51 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::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 |
Implements WatchedItemStoreInterface.
Definition at line 59 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countWatchedItems | ( | User | $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.
User | $user |
Implements WatchedItemStoreInterface.
Definition at line 43 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countWatchers | ( | LinkTarget | $target | ) |
LinkTarget | $target |
Implements WatchedItemStoreInterface.
Definition at line 47 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::countWatchersMultiple | ( | array | $targets, |
array | $options = [] ) |
LinkTarget[] | $targets | |
array | $options | Allowed keys: 'minimumWatchers' => int |
Implements WatchedItemStoreInterface.
Definition at line 55 of file NoWriteWatchedItemStore.php.
References $options.
NoWriteWatchedItemStore::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 |
Implements WatchedItemStoreInterface.
Definition at line 93 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::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 |
Implements WatchedItemStoreInterface.
Definition at line 97 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::getNotificationTimestampsBatch | ( | User | $user, |
array | $targets ) |
User | $user | |
LinkTarget[] | $targets |
Implements WatchedItemStoreInterface.
Definition at line 85 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::getWatchedItem | ( | User | $user, |
LinkTarget | $target ) |
Get an item (may be cached)
User | $user | |
LinkTarget | $target |
Implements WatchedItemStoreInterface.
Definition at line 69 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::getWatchedItemsForUser | ( | User | $user, |
array | $options = [] ) |
User | $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 |
Implements WatchedItemStoreInterface.
Definition at line 77 of file NoWriteWatchedItemStore.php.
References $options.
NoWriteWatchedItemStore::isWatched | ( | User | $user, |
LinkTarget | $target ) |
Must be called separately for Subject & Talk namespaces.
User | $user | |
LinkTarget | $target |
Implements WatchedItemStoreInterface.
Definition at line 81 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::loadWatchedItem | ( | User | $user, |
LinkTarget | $target ) |
Loads an item from the db.
User | $user | |
LinkTarget | $target |
Implements WatchedItemStoreInterface.
Definition at line 73 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::removeWatch | ( | User | $user, |
LinkTarget | $target ) |
Removes the an entry for the User watching the LinkTarget Must be called separately for Subject & Talk namespaces.
User | $user | |
LinkTarget | $target |
DBUnexpectedError | |
MWException |
Implements WatchedItemStoreInterface.
Definition at line 109 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::resetAllNotificationTimestampsForUser | ( | User | $user | ) |
Reset all watchlist notificaton timestamps for a user using the job queue.
User | $user | The user to reset the timestamps for |
Implements WatchedItemStoreInterface.
Definition at line 125 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::resetNotificationTimestamp | ( | User | $user, |
Title | $title, | ||
$force = '', | |||
$oldid = 0 ) |
Reset the notification timestamp of this entry.
User | $user | |
Title | $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. |
Implements WatchedItemStoreInterface.
Definition at line 129 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::setNotificationTimestampsForUser | ( | User | $user, |
$timestamp, | |||
array | $targets = [] ) |
User | $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 |
Implements WatchedItemStoreInterface.
Definition at line 113 of file NoWriteWatchedItemStore.php.
NoWriteWatchedItemStore::updateNotificationTimestamp | ( | User | $editor, |
LinkTarget | $target, | ||
$timestamp ) |
User | $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 timestamp to this value |
Implements WatchedItemStoreInterface.
Definition at line 121 of file NoWriteWatchedItemStore.php.
|
private |
Definition at line 33 of file NoWriteWatchedItemStore.php.
Referenced by __construct().