MediaWiki REL1_32
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()

◆ articles()

◆ 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()

◆ getLB()

static SiteStats::getLB ( )
staticprivate
Returns
LoadBalancer

Definition at line 300 of file SiteStats.php.

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

◆ images()

◆ 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, $e, array(), and function.

Referenced by ApiQuerySiteinfo\appendStatistics(), SiteStatsTest\testJobsCountGetCached(), and ApiQuerySiteinfoTest\testStatistics().

◆ 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

◆ pages()

◆ pagesInNs()

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

Definition at line 201 of file SiteStats.php.

References $cache, $dbr, $fname, array(), DB_REPLICA, function, 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, $value, and array().

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(), SiteStatsUpdateTest\testDoUpdate(), and SiteStatsUpdate\tryDBUpdateInternal().

◆ 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: