Class designed for counting of stats.
More...
|
| | __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 | 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 | getDB ( $index, $groups=[]) |
| |
Class designed for counting of stats.
Definition at line 26 of file SiteStatsInit.php.
◆ __construct()
| SiteStatsInit::__construct |
( |
|
$database = false | ) |
|
◆ articles()
| SiteStatsInit::articles |
( |
| ) |
|
◆ doAllAndCommit()
| static SiteStatsInit::doAllAndCommit |
( |
|
$database, |
|
|
array |
$options = [] |
|
) |
| |
|
static |
Do all updates and commit them.
More or less a replacement for the original initStats, but without output.
- Parameters
-
| IDatabase | bool | $database |
- bool: Whether to use the master DB
- IDatabase: Database connection to use
|
| array | $options | Array of options, may contain the following values
- activeUsers bool: Whether to update the number of active users (default: false)
|
Definition at line 134 of file SiteStatsInit.php.
References DB_MASTER.
Referenced by DatabaseUpdater\checkStats(), and SiteStats\loadAndLazyInit().
◆ doPlaceholderInit()
| static SiteStatsInit::doPlaceholderInit |
( |
| ) |
|
|
static |
◆ edits()
◆ files()
◆ getDB()
| static SiteStatsInit::getDB |
( |
|
$index, |
|
|
|
$groups = [] |
|
) |
| |
|
staticprivate |
- Parameters
-
| int | $index | |
| string[] | string | $groups | |
- Returns
- IDatabase
Definition at line 197 of file SiteStatsInit.php.
◆ pages()
◆ refresh()
| SiteStatsInit::refresh |
( |
| ) |
|
Refresh site_stats.
Definition at line 173 of file SiteStatsInit.php.
References $articles, $edits, $files, $pages, $users, articles(), DB_MASTER, edits(), files(), getDB(), pages(), and users().
◆ users()
◆ $articles
| int SiteStatsInit::$articles |
|
private |
◆ $dbr
◆ $edits
| int SiteStatsInit::$edits |
|
private |
◆ $files
| int SiteStatsInit::$files |
|
private |
◆ $pages
| int SiteStatsInit::$pages |
|
private |
◆ $users
| int SiteStatsInit::$users |
|
private |
The documentation for this class was generated from the following file: