MediaWiki  1.27.1
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 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 ()
 Return the total number of page views. More...
 

Static Private Member Functions

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

Static Private Attributes

static int $jobs
 
static bool $loaded = false
 
static int[] $pageCount = []
 
static bool ResultWrapper $row
 

Detailed Description

Static accessor class for site_stats and related things.

Definition at line 26 of file SiteStats.php.

Member Function Documentation

static SiteStats::activeUsers ( )
static
static SiteStats::articles ( )
static
static SiteStats::doLoad (   $db)
static
Parameters
IDatabase$db
Returns
bool|ResultWrapper

Definition at line 101 of file SiteStats.php.

static SiteStats::edits ( )
static
static SiteStats::images ( )
static
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
bool | object$row
Returns
bool

Definition at line 248 of file SiteStats.php.

References as.

static SiteStats::jobs ( )
static
Returns
int

Definition at line 203 of file SiteStats.php.

References $e, and JobQueueGroup\singleton().

Referenced by ApiQuerySiteinfo\appendStatistics().

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

Definition at line 46 of file SiteStats.php.

References DB_SLAVE, and wfGetDB().

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

Definition at line 67 of file SiteStats.php.

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

static SiteStats::numberingroup (   $group)
static
static SiteStats::pages ( )
static
static SiteStats::pagesInNs (   $ns)
static
Parameters
int$ns
Returns
int

Definition at line 226 of file SiteStats.php.

References $dbr, DB_SLAVE, and wfGetDB().

Referenced by CoreParserFunctions\pagesinnamespace().

static SiteStats::recache ( )
static

Definition at line 39 of file SiteStats.php.

References load.

static SiteStats::users ( )
static
static SiteStats::views ( )
static

Return the total number of page views.

Except we don't track those anymore. Stop calling this function, it will be removed some time in the future. It's kept here simply to prevent fatal errors.

Deprecated:
since 1.25
Returns
int

Definition at line 121 of file SiteStats.php.

References wfDeprecated().

Member Data Documentation

int SiteStats::$jobs
staticprivate

Definition at line 34 of file SiteStats.php.

bool SiteStats::$loaded = false
staticprivate

Definition at line 31 of file SiteStats.php.

int [] SiteStats::$pageCount = []
staticprivate

Definition at line 37 of file SiteStats.php.

bool ResultWrapper SiteStats::$row
staticprivate

Definition at line 28 of file SiteStats.php.

Referenced by loadAndLazyInit().


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