SiteStatsInit Class Reference

Class designed for counting of stats. More...

List of all members.

Public Member Functions

 __construct ($useMaster=false)
 Constructor.
 edits ()
 Count the total number of edits.
 articles ()
 Count pages in article space.
 pages ()
 Count total pages.
 users ()
 Count total users.
 views ()
 Count views.
 files ()
 Count total files.
 update ()
 Update the current row with the selected values.
 refresh ()
 Refresh site_stats.

Static Public Member Functions

static doAllAndCommit ($update, $noViews=false, $activeUsers=false)
 Do all updates and commit them.

Private Member Functions

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

Private Attributes

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


Detailed Description

Class designed for counting of stats.

Definition at line 246 of file SiteStats.php.


Constructor & Destructor Documentation

SiteStatsInit::__construct ( useMaster = false  ) 

Constructor.

Parameters:
$useMaster bool Whether to use the master db

Definition at line 258 of file SiteStats.php.

References wfGetDB().


Member Function Documentation

SiteStatsInit::articles (  ) 

Count pages in article space.

Returns:
int

Definition at line 276 of file SiteStats.php.

References $wgContentNamespaces.

static SiteStatsInit::doAllAndCommit ( update,
noViews = false,
activeUsers = false 
) [static]

Do all updates and commit them.

More or less a replacement for the original initStats, but without the calls to wfOut()

Parameters:
$update bool Whether to update the current stats or write fresh
$noViews bool When true, do not update the number of page views
$activeUsers Whether to update the number of active users

Definition at line 325 of file SiteStats.php.

References SiteStatsUpdate::cacheUpdate(), and wfGetDB().

Referenced by do_stats_init(), and SiteStats::loadAndLazyInit().

SiteStatsInit::edits (  ) 

Count the total number of edits.

Returns:
int

Definition at line 266 of file SiteStats.php.

SiteStatsInit::files (  ) 

Count total files.

Returns:
int

Definition at line 313 of file SiteStats.php.

SiteStatsInit::getDbParams (  )  [private]

Return three arrays of params for the db queries.

Returns:
array

Definition at line 373 of file SiteStats.php.

References SiteStats::numberingroup().

Referenced by refresh(), and update().

SiteStatsInit::pages (  ) 

Count total pages.

Returns:
int

Definition at line 286 of file SiteStats.php.

SiteStatsInit::refresh (  ) 

Refresh site_stats.

Erase the current record and save all the new values.

Definition at line 362 of file SiteStats.php.

References $dbw, getDbParams(), and wfGetDB().

SiteStatsInit::update (  ) 

Update the current row with the selected values.

Definition at line 352 of file SiteStats.php.

References $dbw, getDbParams(), and wfGetDB().

SiteStatsInit::users (  ) 

Count total users.

Returns:
int

Definition at line 295 of file SiteStats.php.

SiteStatsInit::views (  ) 

Count views.

Returns:
int

Definition at line 304 of file SiteStats.php.


Member Data Documentation

SiteStatsInit::$db [private]

Definition at line 249 of file SiteStats.php.

SiteStatsInit::$mArticles [private]

Definition at line 252 of file SiteStats.php.

SiteStatsInit::$mEdits [private]

Definition at line 252 of file SiteStats.php.

SiteStatsInit::$mFiles = 0 [private]

Definition at line 252 of file SiteStats.php.

SiteStatsInit::$mPages [private]

Definition at line 252 of file SiteStats.php.

SiteStatsInit::$mUsers [private]

Definition at line 252 of file SiteStats.php.

SiteStatsInit::$mViews [private]

Definition at line 252 of file SiteStats.php.


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

Generated on Sat Apr 30 22:57:49 2011 for MediaWiki by  doxygen 1.5.9