MediaWiki REL1_31
|
Class designed for counting of stats. More...
Public Member Functions | |
__construct ( $database=false) | |
articles () | |
Count pages in article space(s) | |
edits () | |
Count the total number of edits. | |
files () | |
Count total files. | |
pages () | |
Count total pages. | |
refresh () | |
Refresh site_stats. | |
users () | |
Count total users. | |
Static Public Member Functions | |
static | doAllAndCommit ( $database, array $options=[]) |
Do all updates and commit them. | |
static | doPlaceholderInit () |
Insert a dummy row with all zeroes if no row is present. | |
Static Private Member Functions | |
static | getDB ( $index, $groups=[]) |
Private Attributes | |
int | $articles |
$dbr | |
int | $edits |
int | $files |
int | $pages |
int | $users |
Class designed for counting of stats.
Definition at line 26 of file SiteStatsInit.php.
SiteStatsInit::__construct | ( | $database = false | ) |
bool | IDatabase | $database |
|
Definition at line 45 of file SiteStatsInit.php.
References DB_MASTER, DB_REPLICA, and getDB().
SiteStatsInit::articles | ( | ) |
Count pages in article space(s)
Definition at line 70 of file SiteStatsInit.php.
References $articles, $tables, and articles().
Referenced by articles(), and refresh().
|
static |
Do all updates and commit them.
More or less a replacement for the original initStats, but without output.
IDatabase | bool | $database |
|
array | $options | Array of options, may contain the following values
|
Definition at line 134 of file SiteStatsInit.php.
References $options, SiteStatsUpdate\cacheUpdate(), DB_MASTER, and false.
Referenced by DatabaseUpdater\checkStats(), and SiteStats\loadAndLazyInit().
|
static |
Insert a dummy row with all zeroes if no row is present.
Definition at line 157 of file SiteStatsInit.php.
References DB_MASTER, getDB(), and SiteStats\selectFields().
Referenced by MediaWikiTestCase\addCoreDBData(), and SiteStats\loadAndLazyInit().
SiteStatsInit::edits | ( | ) |
SiteStatsInit::files | ( | ) |
|
staticprivate |
int | $index | |
string[] | $groups |
Definition at line 197 of file SiteStatsInit.php.
Referenced by __construct(), doPlaceholderInit(), and refresh().
SiteStatsInit::pages | ( | ) |
SiteStatsInit::refresh | ( | ) |
SiteStatsInit::users | ( | ) |
|
private |
Definition at line 32 of file SiteStatsInit.php.
Referenced by articles(), and refresh().
|
private |
Definition at line 28 of file SiteStatsInit.php.
|
private |
Definition at line 30 of file SiteStatsInit.php.
|
private |
Definition at line 38 of file SiteStatsInit.php.
|
private |
Definition at line 34 of file SiteStatsInit.php.
|
private |
Definition at line 36 of file SiteStatsInit.php.