MediaWiki  REL1_19
SiteStatsInit Class Reference

Class designed for counting of stats. More...

List of all members.

Public Member Functions

 __construct ($database=false)
 Constructor.
 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.
 update ()
 Update the current row with the selected values.
 users ()
 Count total users.
 views ()
 Count views.

Static Public Member Functions

static doAllAndCommit ($database, array $options=array())
 Do all updates and commit them.

Public Attributes

 $mArticles
 $mFiles = 0
 $mPages
 $mUsers
 $mViews

Private Member Functions

 getDbParams ()
 Return three arrays of params for the db queries.

Private Attributes

 $db
 $mEdits

Detailed Description

Class designed for counting of stats.

Definition at line 310 of file SiteStats.php.


Constructor & Destructor Documentation

SiteStatsInit::__construct ( database = false)

Constructor.

Parameters:
$databaseBoolean or DatabaseBase:
  • Boolean: whether to use the master DB
  • DatabaseBase: database connection to use

Definition at line 324 of file SiteStats.php.

References wfGetDB().

Here is the call graph for this function:


Member Function Documentation

Count pages in article space(s)

Returns:
Integer

Definition at line 346 of file SiteStats.php.

References $wgArticleCountMethod, and MWNamespace\getContentNamespaces().

Here is the call graph for this function:

static SiteStatsInit::doAllAndCommit ( database,
array $  options = array() 
) [static]

Do all updates and commit them.

More or less a replacement for the original initStats, but without output.

Parameters:
$databaseDatabaseBase|bool
  • Boolean: whether to use the master DB
  • DatabaseBase: database connection to use
$optionsArray of options, may contain the following values
  • update Boolean: whether to update the current stats (true) or write fresh (false) (default: false)
  • views Boolean: when true, do not update the number of page views (default: true)
  • activeUsers Boolean: whether to update the number of active users (default: false)

Definition at line 420 of file SiteStats.php.

References $options, SiteStatsUpdate\cacheUpdate(), and wfGetDB().

Referenced by DatabaseUpdater\checkStats(), and SiteStats\loadAndLazyInit().

Here is the call graph for this function:

Here is the caller graph for this function:

Count the total number of edits.

Returns:
Integer

Definition at line 336 of file SiteStats.php.

Count total files.

Returns:
Integer

Definition at line 403 of file SiteStats.php.

Return three arrays of params for the db queries.

Returns:
Array

Definition at line 474 of file SiteStats.php.

Referenced by refresh(), and update().

Here is the caller graph for this function:

Count total pages.

Returns:
Integer

Definition at line 376 of file SiteStats.php.

Refresh site_stats.

Erase the current record and save all the new values.

Definition at line 463 of file SiteStats.php.

References getDbParams(), and wfGetDB().

Here is the call graph for this function:

Update the current row with the selected values.

Definition at line 453 of file SiteStats.php.

References getDbParams(), and wfGetDB().

Here is the call graph for this function:

Count total users.

Returns:
Integer

Definition at line 385 of file SiteStats.php.

Count views.

Returns:
Integer

Definition at line 394 of file SiteStats.php.


Member Data Documentation

SiteStatsInit::$db [private]

Definition at line 313 of file SiteStats.php.

SiteStatsInit::$mArticles

Definition at line 316 of file SiteStats.php.

SiteStatsInit::$mEdits [private]

Definition at line 316 of file SiteStats.php.

SiteStatsInit::$mFiles = 0

Definition at line 316 of file SiteStats.php.

SiteStatsInit::$mPages

Definition at line 316 of file SiteStats.php.

SiteStatsInit::$mUsers

Definition at line 316 of file SiteStats.php.

SiteStatsInit::$mViews

Definition at line 316 of file SiteStats.php.


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