MediaWiki
1.33.0
|
Class designed for counting of stats. More...
Public Member Functions | |
__construct ( $database=false) | |
articles () | |
Count pages in article space(s) More... | |
edits () | |
Count the total number of edits. More... | |
files () | |
Count total files. More... | |
pages () | |
Count total pages. More... | |
refresh () | |
Refresh site_stats. More... | |
users () | |
Count total users. More... | |
Static Public Member Functions | |
static | doAllAndCommit ( $database, array $options=[]) |
Do all updates and commit them. More... | |
static | doPlaceholderInit () |
Insert a dummy row with all zeroes if no row is present. More... | |
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 MWNamespace\getContentNamespaces().
Referenced by 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(), SiteStats\loadAndLazyInit(), and MediaWikiTestCase\truncateTable().
SiteStatsInit::edits | ( | ) |
Count the total number of edits.
Definition at line 59 of file SiteStatsInit.php.
References $edits.
Referenced by refresh().
SiteStatsInit::files | ( | ) |
Count total files.
Definition at line 118 of file SiteStatsInit.php.
References $files.
Referenced by refresh().
|
staticprivate |
int | $index | |
string[] | $groups |
Definition at line 197 of file SiteStatsInit.php.
Referenced by __construct(), doPlaceholderInit(), and refresh().
SiteStatsInit::pages | ( | ) |
Count total pages.
Definition at line 98 of file SiteStatsInit.php.
References $pages.
Referenced by refresh().
SiteStatsInit::refresh | ( | ) |
SiteStatsInit::users | ( | ) |
Count total users.
Definition at line 108 of file SiteStatsInit.php.
References $users.
Referenced by refresh().
|
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.