BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
GenderCache Class Reference

Public Member Functions

 getGenderOf ($username, $caller= '')
 
 doLinkBatch ($data, $caller= '')
 
 doTitlesArray ($titles, $caller= '')
 
 doQuery ($users, $caller= '')
 

Static Public Member Functions

static singleton ()
 

Protected Member Functions

 getDefault ()
 

Protected Attributes

 $cache = []
 
 $default
 
 $misses = 0
 
 $missLimit = 1000
 

Detailed Description

Caches user genders when needed to use correct namespace aliases.

Since
1.18

Member Function Documentation

GenderCache::doLinkBatch (   $data,
  $caller = '' 
)

Wrapper for doQuery that processes raw LinkBatch data.

Parameters
array$data
string$caller
GenderCache::doQuery (   $users,
  $caller = '' 
)

Preloads genders for given list of users.

Parameters
array | string$usersUsernames
string$callerThe calling method
GenderCache::doTitlesArray (   $titles,
  $caller = '' 
)

Wrapper for doQuery that processes a title or string array.

Since
1.20
Parameters
array$titlesArray of Title objects or strings
string$callerThe calling method
GenderCache::getDefault ( )
protected

Returns the default gender option in this wiki.

Returns
string
GenderCache::getGenderOf (   $username,
  $caller = '' 
)

Returns the gender for given username.

Parameters
string | User$username
string$callerThe calling method
Returns
string
static GenderCache::singleton ( )
static
Deprecated:
in 1.28 see MediaWikiServices::getInstance()->getGenderCache()
Returns
GenderCache

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