MediaWiki REL1_35
SiteStats Class Reference

Static accessor class for site_stats and related things. More...

Collaboration diagram for SiteStats:

Static Public Member Functions

static activeUsers ()
 
static articles ()
 
static edits ()
 
static images ()
 
static jobs ()
 Total number of jobs in the job queue.
 
static numberingroup ( $group)
 Find the number of users in a given user group.
 
static pages ()
 
static pagesInNs ( $ns)
 
static selectFields ()
 
static unload ()
 Trigger a reload next time a field is accessed.
 
static users ()
 

Static Protected Member Functions

static load ()
 
static loadAndLazyInit ()
 

Static Private Member Functions

static doLoadFromDB (IDatabase $db)
 
static getLB ()
 
static isRowSane ( $row)
 Is the provided row of site stats sane, or should it be regenerated?
 
static salvageInsaneRow ( $row)
 

Static Private Attributes

static stdClass $row
 

Detailed Description

Static accessor class for site_stats and related things.

Definition at line 31 of file SiteStats.php.

Member Function Documentation

◆ activeUsers()

static SiteStats::activeUsers ( )
static

◆ articles()

static SiteStats::articles ( )
static

◆ doLoadFromDB()

static SiteStats::doLoadFromDB ( IDatabase  $db)
staticprivate
Parameters
IDatabase$db
Returns
stdClass|bool

Definition at line 241 of file SiteStats.php.

References Wikimedia\Rdbms\IDatabase\selectRow().

Referenced by loadAndLazyInit().

◆ edits()

static SiteStats::edits ( )
static

◆ getLB()

static SiteStats::getLB ( )
staticprivate
Returns
LoadBalancer

Definition at line 300 of file SiteStats.php.

Referenced by loadAndLazyInit(), numberingroup(), and pagesInNs().

◆ images()

static SiteStats::images ( )
static

◆ isRowSane()

static SiteStats::isRowSane (   $row)
staticprivate

Is the provided row of site stats sane, or should it be regenerated?

Checks only fields which are filled by SiteStatsInit::refresh.

Parameters
bool | object$row
Returns
bool

Definition at line 258 of file SiteStats.php.

References $row.

◆ jobs()

static SiteStats::jobs ( )
static

Total number of jobs in the job queue.

Returns
int

Definition at line 179 of file SiteStats.php.

References $cache.

Referenced by ApiQuerySiteinfo\appendStatistics().

◆ load()

static SiteStats::load ( )
staticprotected

Definition at line 42 of file SiteStats.php.

References loadAndLazyInit().

Referenced by activeUsers(), articles(), edits(), images(), pages(), and users().

◆ loadAndLazyInit()

static SiteStats::loadAndLazyInit ( )
staticprotected

◆ numberingroup()

static SiteStats::numberingroup (   $group)
static

Find the number of users in a given user group.

Parameters
string$groupName of group
Returns
int

Definition at line 150 of file SiteStats.php.

References $cache, $dbr, DB_REPLICA, and getLB().

Referenced by ApiQuerySiteinfo\appendStatistics(), ApiQuerySiteinfo\appendUserGroups(), CoreMagicVariables\expand(), SpecialStatistics\getGroupStats(), CoreParserFunctions\numberingroup(), and CoreParserFunctions\numberofadmins().

◆ pages()

static SiteStats::pages ( )
static

◆ pagesInNs()

static SiteStats::pagesInNs (   $ns)
static
Parameters
int$ns
Returns
int

Definition at line 201 of file SiteStats.php.

References $cache, $dbr, DB_REPLICA, and getLB().

Referenced by CoreParserFunctions\pagesinnamespace().

◆ salvageInsaneRow()

static SiteStats::salvageInsaneRow (   $row)
staticprivate
Parameters
stdClass | bool$row
Returns
stdClass

Definition at line 285 of file SiteStats.php.

References $row.

Referenced by loadAndLazyInit().

◆ selectFields()

static SiteStats::selectFields ( )
static
Returns
array

Definition at line 226 of file SiteStats.php.

Referenced by SiteStatsInit\doPlaceholderInit().

◆ unload()

static SiteStats::unload ( )
static

Trigger a reload next time a field is accessed.

Definition at line 38 of file SiteStats.php.

Referenced by SiteStatsUpdate\cacheUpdate(), and SiteStatsUpdate\doUpdate().

◆ users()

Member Data Documentation

◆ $row

stdClass SiteStats::$row
staticprivate

Definition at line 33 of file SiteStats.php.

Referenced by isRowSane(), loadAndLazyInit(), and salvageInsaneRow().


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