MediaWiki  1.23.2
SiteStats Class Reference

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

Static Public Member Functions

static activeUsers ()
 
static articles ()
 
static doLoad ( $db)
 
static edits ()
 
static images ()
 
static jobs ()
 
static load ( $recache=false)
 
static loadAndLazyInit ()
 
static numberingroup ( $group)
 Find the number of users in a given user group. More...
 
static pages ()
 
static pagesInNs ( $ns)
 
static recache ()
 
static users ()
 
static views ()
 

Static Public Attributes

static $groupMemberCounts = array()
 
static $jobs
 
static $loaded = false
 
static $pageCount = array()
 
static $row
 

Static Private Member Functions

static isSane ( $row)
 Is the provided row of site stats sane, or should it be regenerated? More...
 

Detailed Description

Static accessor class for site_stats and related things.

Definition at line 26 of file SiteStats.php.

Member Function Documentation

◆ activeUsers()

static SiteStats::activeUsers ( )
static
Returns
int

Definition at line 148 of file SiteStats.php.

References load().

Referenced by SpecialStatistics\execute(), and CoreParserFunctions\numberofactiveusers().

◆ articles()

static SiteStats::articles ( )
static
Returns
int

Definition at line 124 of file SiteStats.php.

References load().

Referenced by SpecialStatistics\execute(), and CoreParserFunctions\numberofarticles().

◆ doLoad()

static SiteStats::doLoad (   $db)
static
Parameters
$dbDatabaseBase
Returns
Bool|ResultWrapper

Definition at line 92 of file SiteStats.php.

References array().

Referenced by load(), and loadAndLazyInit().

◆ edits()

static SiteStats::edits ( )
static
Returns
int

Definition at line 116 of file SiteStats.php.

References load().

Referenced by SpecialStatistics\execute(), and CoreParserFunctions\numberofedits().

◆ images()

static SiteStats::images ( )
static
Returns
int

Definition at line 156 of file SiteStats.php.

References load().

Referenced by SpecialStatistics\execute(), and CoreParserFunctions\numberoffiles().

◆ isSane()

static SiteStats::isSane (   $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
$row
Returns
bool

Definition at line 230 of file SiteStats.php.

References $row, array(), and as.

◆ jobs()

static SiteStats::jobs ( )
static
Returns
int

Definition at line 189 of file SiteStats.php.

References $dbr, $jobs, DB_SLAVE, JobQueueGroup\singleton(), and wfGetDB().

◆ load()

static SiteStats::load (   $recache = false)
static
Parameters
$recachebool

Definition at line 39 of file SiteStats.php.

References DB_SLAVE, doLoad(), loadAndLazyInit(), and wfGetDB().

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

◆ loadAndLazyInit()

static SiteStats::loadAndLazyInit ( )
static
Returns
Bool|ResultWrapper

Definition at line 60 of file SiteStats.php.

References $row, DB_MASTER, DB_SLAVE, SiteStatsInit\doAllAndCommit(), doLoad(), wfDebug(), and wfGetDB().

Referenced by load().

◆ numberingroup()

static SiteStats::numberingroup (   $group)
static

Find the number of users in a given user group.

Parameters
string$groupname of group
Returns
Integer

Definition at line 166 of file SiteStats.php.

References $dbr, $wgMemc, array(), DB_SLAVE, global, wfGetDB(), and wfMemcKey().

Referenced by SpecialStatistics\getGroupStats(), CoreParserFunctions\numberingroup(), and CoreParserFunctions\numberofadmins().

◆ pages()

static SiteStats::pages ( )
static
Returns
int

Definition at line 132 of file SiteStats.php.

References load().

Referenced by SpecialStatistics\execute(), and CoreParserFunctions\numberofpages().

◆ pagesInNs()

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

Definition at line 206 of file SiteStats.php.

References $dbr, array(), DB_SLAVE, wfGetDB(), wfProfileIn(), and wfProfileOut().

Referenced by CoreParserFunctions\pagesinnamespace().

◆ recache()

static SiteStats::recache ( )
static

Definition at line 32 of file SiteStats.php.

References load().

◆ users()

static SiteStats::users ( )
static
Returns
int

Definition at line 140 of file SiteStats.php.

References load().

Referenced by SpecialStatistics\execute(), and CoreParserFunctions\numberofusers().

◆ views()

static SiteStats::views ( )
static
Returns
int

Definition at line 108 of file SiteStats.php.

References load().

Referenced by SpecialStatistics\execute(), and CoreParserFunctions\numberofviews().

Member Data Documentation

◆ $groupMemberCounts

SiteStats::$groupMemberCounts = array()
static

Definition at line 30 of file SiteStats.php.

◆ $jobs

SiteStats::$jobs
static

Definition at line 28 of file SiteStats.php.

Referenced by jobs().

◆ $loaded

SiteStats::$loaded = false
static

Definition at line 27 of file SiteStats.php.

◆ $pageCount

SiteStats::$pageCount = array()
static

Definition at line 29 of file SiteStats.php.

◆ $row

SiteStats::$row
static

Definition at line 27 of file SiteStats.php.

Referenced by isSane(), and loadAndLazyInit().


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