UserRightsProxy Class Reference

Cut-down copy of User interface for local-interwiki-database user rights manipulation. More...

List of all members.

Public Member Functions

 getDBName ()
 Accessor for $this->database.
 getId ()
 isAnon ()
 getName ()
 Same as User::getName().
 getUserPage ()
 Same as User::getUserPage().
 getGroups ()
 Replaces User::getUserGroups().
 addGroup ($group)
 Replaces User::addUserGroup().
 removeGroup ($group)
 Replaces User::removeUserGroup().
 invalidateCache ()
 Replaces User::touchUser().

Static Public Member Functions

static validDatabase ($database)
 Confirm the selected database name is a valid local interwiki database name.
static whoIs ($database, $id)
 Same as User::whoIs().
static newFromId ($database, $id)
 Factory function; get a remote user entry by ID number.
static newFromName ($database, $name)
 Factory function; get a remote user entry by name.
static getDB ($database)
 Open a database connection to work on for the requested user.

Private Member Functions

 __construct ($db, $database, $name, $id)
 Constructor.

Static Private Member Functions

static newFromLookup ($database, $field, $value)


Detailed Description

Cut-down copy of User interface for local-interwiki-database user rights manipulation.

Definition at line 7 of file UserRightsProxy.php.


Constructor & Destructor Documentation

UserRightsProxy::__construct ( db,
database,
name,
id 
) [private]

Constructor.

See also:
newFromId()

newFromName()

Parameters:
$db DatabaseBase: db connection
$database String: database name
$name String: user name
$id Integer: user ID

Definition at line 19 of file UserRightsProxy.php.

References $name.


Member Function Documentation

UserRightsProxy::addGroup ( group  ) 

Replaces User::addUserGroup().

Definition at line 164 of file UserRightsProxy.php.

static UserRightsProxy::getDB ( database  )  [static]

Open a database connection to work on for the requested user.

This may be a new connection to another database for remote users.

Parameters:
$database String
Returns:
DatabaseBase or null if invalid selection

Definition at line 107 of file UserRightsProxy.php.

References $wgDBname, $wgLocalDatabases, and wfGetDB().

Referenced by newFromLookup().

UserRightsProxy::getDBName (  ) 

Accessor for $this->database.

Returns:
String: database name

Definition at line 31 of file UserRightsProxy.php.

UserRightsProxy::getGroups (  ) 

Replaces User::getUserGroups().

Definition at line 149 of file UserRightsProxy.php.

References $res.

UserRightsProxy::getId (  ) 

Definition at line 120 of file UserRightsProxy.php.

Referenced by isAnon().

UserRightsProxy::getName (  ) 

Same as User::getName().

Returns:
String

Definition at line 133 of file UserRightsProxy.php.

Referenced by getUserPage().

UserRightsProxy::getUserPage (  ) 

Same as User::getUserPage().

Returns:
Title object

Definition at line 142 of file UserRightsProxy.php.

References getName(), and Title::makeTitle().

UserRightsProxy::invalidateCache (  ) 

Replaces User::touchUser().

Definition at line 189 of file UserRightsProxy.php.

References $wgMemc, and wfForeignMemcKey().

UserRightsProxy::isAnon (  ) 

Definition at line 124 of file UserRightsProxy.php.

References getId().

static UserRightsProxy::newFromId ( database,
id 
) [static]

Factory function; get a remote user entry by ID number.

Parameters:
$database String: database name
$id Integer: user ID
Returns:
UserRightsProxy or null if doesn't exist

Definition at line 69 of file UserRightsProxy.php.

References newFromLookup().

Referenced by whoIs().

static UserRightsProxy::newFromLookup ( database,
field,
value 
) [static, private]

Definition at line 84 of file UserRightsProxy.php.

References getDB().

Referenced by newFromId(), and newFromName().

static UserRightsProxy::newFromName ( database,
name 
) [static]

Factory function; get a remote user entry by name.

Parameters:
$database String: database name
$name String: user name
Returns:
UserRightsProxy or null if doesn't exist

Definition at line 80 of file UserRightsProxy.php.

References $name, and newFromLookup().

Referenced by UserrightsPage::fetchUser().

UserRightsProxy::removeGroup ( group  ) 

Replaces User::removeUserGroup().

Definition at line 177 of file UserRightsProxy.php.

static UserRightsProxy::validDatabase ( database  )  [static]

Confirm the selected database name is a valid local interwiki database name.

Parameters:
$database String: database name
Returns:
Boolean

Definition at line 41 of file UserRightsProxy.php.

References $wgLocalDatabases.

Referenced by UserrightsPage::fetchUser().

static UserRightsProxy::whoIs ( database,
id 
) [static]

Same as User::whoIs().

Parameters:
$database String: database name
$id Integer: user ID
Returns:
String: user name or false if the user doesn't exist

Definition at line 53 of file UserRightsProxy.php.

References newFromId().

Referenced by UserrightsPage::fetchUser().


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

Generated on Sat Apr 30 22:57:52 2011 for MediaWiki by  doxygen 1.5.9