MediaWiki
1.23.2
|
Public Member Functions | |
doQuery (array $userIds, $options=array(), $caller='') | |
Preloads user names for given list of users. More... | |
getProp ( $userId, $prop) | |
Get a property of a user based on their user ID. More... | |
getUserName ( $userId, $ip) | |
Get the name of a user or return $ip if the user ID is 0. More... | |
Static Public Member Functions | |
static | singleton () |
Protected Member Functions | |
__construct () | |
queryNeeded ( $uid, $type, array $options) | |
Check if a cache type is in $options and was not loaded for this user. More... | |
Protected Attributes | |
$cache = array() | |
$typesCached = array() | |
Definition at line 27 of file UserCache.php.
|
protected |
Definition at line 43 of file UserCache.php.
Preloads user names for given list of users.
array | $userIds | List of user IDs |
array | $options | Option flags; include 'userpage' and 'usertalk' |
string | $caller | the calling method |
Definition at line 82 of file UserCache.php.
References $comment, $dbr, $lb, $name, $options, $res, array(), as, cache, DB_SLAVE, NS_USER, NS_USER_TALK, queryNeeded(), wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by getProp().
UserCache::getProp | ( | $userId, | |
$prop | |||
) |
Get a property of a user based on their user ID.
Definition at line 53 of file UserCache.php.
References array(), cache, doQuery(), and wfDebug().
Referenced by getUserName().
UserCache::getUserName | ( | $userId, | |
$ip | |||
) |
Get the name of a user or return $ip if the user ID is 0.
integer | $userId | |
string | $ip |
Definition at line 72 of file UserCache.php.
References getProp().
|
protected |
Check if a cache type is in $options and was not loaded for this user.
$uid | integer user ID | |
string | $type | Cache type |
array | $options | Requested cache types |
Definition at line 148 of file UserCache.php.
References $options, and $type.
Referenced by doQuery().
|
static |
Definition at line 34 of file UserCache.php.
Referenced by ImageListPager\doBatchLookups(), ProtectedPagesPager\formatValue(), ProtectedPagesPager\preprocessResults(), User\whoIs(), and User\whoIsReal().
|
protected |
Definition at line 28 of file UserCache.php.
|
protected |
Definition at line 29 of file UserCache.php.