MediaWiki  1.28.3
WatchedItem Class Reference

Representation of a pair of user and title for watchlist entries. More...

Collaboration diagram for WatchedItem:

Public Member Functions

 __construct (User $user, LinkTarget $linkTarget, $notificationTimestamp, $checkRights=null)
 
 addWatch ()
 
 getLinkTarget ()
 
 getNotificationTimestamp ()
 Get the notification timestamp of this entry. More...
 
 getTitle ()
 Back compat pre 1.27 with the WatchedItemStore introduction. More...
 
 getUser ()
 
 isWatched ()
 
 removeWatch ()
 

Static Public Member Functions

static duplicateEntries (Title $oldTitle, Title $newTitle)
 
static fromUserTitle ($user, $title, $checkRights=User::CHECK_USER_RIGHTS)
 

Public Attributes

bool $checkRights = User::CHECK_USER_RIGHTS
 
const CHECK_USER_RIGHTS = User::CHECK_USER_RIGHTS
 
const DEPRECATED_USAGE_TIMESTAMP = -100
 
const IGNORE_USER_RIGHTS = User::IGNORE_USER_RIGHTS
 

Private Attributes

LinkTarget $linkTarget
 
null string $notificationTimestamp
 the value of the wl_notificationtimestamp field More...
 
Title $title
 
User $user
 

Detailed Description

Representation of a pair of user and title for watchlist entries.

Author
Tim Starling
Addshore

Definition at line 32 of file WatchedItem.php.

Constructor & Destructor Documentation

WatchedItem::__construct ( User  $user,
LinkTarget  $linkTarget,
  $notificationTimestamp,
  $checkRights = null 
)
Parameters
User$user
LinkTarget$linkTarget
null | string$notificationTimestampthe value of the wl_notificationtimestamp field
bool | null$checkRightsDO NOT USE - used internally for backward compatibility

Definition at line 82 of file WatchedItem.php.

References $checkRights, $linkTarget, $notificationTimestamp, $user, and user.

Member Function Documentation

WatchedItem::addWatch ( )
Deprecated:
since 1.27 Use User::addWatch()
Returns
bool

Definition at line 163 of file WatchedItem.php.

References getTitle(), user, and wfDeprecated().

static WatchedItem::duplicateEntries ( Title  $oldTitle,
Title  $newTitle 
)
static
WatchedItem::getLinkTarget ( )
Returns
LinkTarget

Definition at line 106 of file WatchedItem.php.

References $linkTarget.

Referenced by WatchedItemStore\cache(), and ApiQueryWatchlist\extractOutputData().

WatchedItem::getNotificationTimestamp ( )

Get the notification timestamp of this entry.

Returns
bool|null|string

Definition at line 115 of file WatchedItem.php.

References $notificationTimestamp, and user.

Referenced by ApiQueryWatchlist\extractOutputData().

WatchedItem::getTitle ( )

Back compat pre 1.27 with the WatchedItemStore introduction.

Todo:

remove in 1.28/9

Returns
Title
Deprecated:
Internal class use only

Definition at line 143 of file WatchedItem.php.

References $title, Title\newFromLinkTarget(), and title.

Referenced by addWatch(), isWatched(), and removeWatch().

WatchedItem::getUser ( )
Returns
User

Definition at line 99 of file WatchedItem.php.

References $user.

Referenced by WatchedItemStore\cache().

WatchedItem::isWatched ( )
Deprecated:
since 1.27 Use User::isWatched()
Returns
bool

Definition at line 186 of file WatchedItem.php.

References getTitle(), user, and wfDeprecated().

WatchedItem::removeWatch ( )
Deprecated:
since 1.27 Use User::removeWatch()
Returns
bool

Definition at line 173 of file WatchedItem.php.

References getTitle(), user, and wfDeprecated().

Member Data Documentation

bool WatchedItem::$checkRights = User::CHECK_USER_RIGHTS
Deprecated:
Internal class use only

Definition at line 53 of file WatchedItem.php.

Referenced by __construct().

LinkTarget WatchedItem::$linkTarget
private

Definition at line 64 of file WatchedItem.php.

Referenced by __construct(), and getLinkTarget().

null string WatchedItem::$notificationTimestamp
private

the value of the wl_notificationtimestamp field

Definition at line 74 of file WatchedItem.php.

Referenced by __construct(), and getNotificationTimestamp().

Title WatchedItem::$title
private
Deprecated:
Internal class use only

Definition at line 59 of file WatchedItem.php.

Referenced by fromUserTitle(), and getTitle().

User WatchedItem::$user
private

Definition at line 69 of file WatchedItem.php.

Referenced by __construct(), fromUserTitle(), and getUser().

const WatchedItem::CHECK_USER_RIGHTS = User::CHECK_USER_RIGHTS
Deprecated:
since 1.27, see User::CHECK_USER_RIGHTS

Definition at line 42 of file WatchedItem.php.

const WatchedItem::DEPRECATED_USAGE_TIMESTAMP = -100
Deprecated:
Internal class use only

Definition at line 47 of file WatchedItem.php.

const WatchedItem::IGNORE_USER_RIGHTS = User::IGNORE_USER_RIGHTS
Deprecated:
since 1.27, see User::IGNORE_USER_RIGHTS

Definition at line 37 of file WatchedItem.php.


The documentation for this class was generated from the following file: