WatchedItem Class Reference

List of all members.

Public Member Functions

 isWatched ()
 Is mTitle being watched by mUser?
 addWatch ()
 Given a title and user (assumes the object is setup), add the watch to the database.
 removeWatch ()
 Same as addWatch, only the opposite.

Static Public Member Functions

static fromUserTitle ($user, $title)
 Create a WatchedItem object with the given user and title.
static duplicateEntries ($ot, $nt)
 Check if the given title already is watched by the user, and if so add watches on a new title.

Public Attributes

 $mTitle
 $mUser
 $id
 $ns
 $ti

Static Private Member Functions

static doDuplicateEntries ($ot, $nt)
 Handle duplicate entries.


Detailed Description

Definition at line 10 of file WatchedItem.php.


Member Function Documentation

WatchedItem::addWatch (  ) 

Given a title and user (assumes the object is setup), add the watch to the database.

Returns:
bool (always true)

Definition at line 54 of file WatchedItem.php.

References $dbw, MWNamespace::getSubject(), MWNamespace::getTalk(), wfGetDB(), wfProfileIn(), and wfProfileOut().

static WatchedItem::doDuplicateEntries ( ot,
nt 
) [static, private]

Handle duplicate entries.

Backend for duplicateEntries().

Definition at line 133 of file WatchedItem.php.

References $dbw, $res, $s, and wfGetDB().

Referenced by duplicateEntries().

static WatchedItem::duplicateEntries ( ot,
nt 
) [static]

Check if the given title already is watched by the user, and if so add watches on a new title.

To be used for page renames and such.

Parameters:
$ot Title: page title to duplicate entries from, if present
$nt Title: page title to add watches on

Definition at line 125 of file WatchedItem.php.

References doDuplicateEntries().

Referenced by Title::moveTo().

static WatchedItem::fromUserTitle ( user,
title 
) [static]

Create a WatchedItem object with the given user and title.

Parameters:
$user User: the user to use for (un)watching
$title Title: the title we're going to (un)watch
Returns:
WatchedItem object

Definition at line 19 of file WatchedItem.php.

References $title, and $user.

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

WatchedItem::isWatched (  ) 

Is mTitle being watched by mUser?

Returns:
bool

Definition at line 38 of file WatchedItem.php.

References $dbr, $res, and wfGetDB().

WatchedItem::removeWatch (  ) 

Same as addWatch, only the opposite.

Returns:
bool

Definition at line 86 of file WatchedItem.php.

References $dbw, $success, MWNamespace::getSubject(), MWNamespace::getTalk(), and wfGetDB().


Member Data Documentation

WatchedItem::$id

Definition at line 11 of file WatchedItem.php.

WatchedItem::$mTitle

Definition at line 11 of file WatchedItem.php.

WatchedItem::$mUser

Definition at line 11 of file WatchedItem.php.

WatchedItem::$ns

Definition at line 11 of file WatchedItem.php.

WatchedItem::$ti

Definition at line 11 of file WatchedItem.php.


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

Generated on Sat Sep 5 02:08:50 2009 for MediaWiki by  doxygen 1.5.9