MediaWiki master
MediaWiki\Deferred\SiteStatsUpdate Class Reference

Class for handling updates to the site_stats table. More...

Inherits MediaWiki\Deferred\DeferrableUpdate, and MediaWiki\Deferred\MergeableUpdate.

Collaboration diagram for MediaWiki\Deferred\SiteStatsUpdate:

Public Member Functions

 __construct ( $views, $edits, $good, $pages=0, $users=0)
 
 doUpdate ()
 Perform the actual work.
 
 merge (MergeableUpdate $update)
 Merge this enqueued update with a new MergeableUpdate of the same qualified class name.
 

Static Public Member Functions

static cacheUpdate (IDatabase $dbw)
 
static factory (array $deltas)
 

Public Attributes

const SHARDS_ON = 10
 

Protected Attributes

int $articles = 0
 
int $edits = 0
 
int $images = 0
 
int $pages = 0
 
int $users = 0
 

Detailed Description

Class for handling updates to the site_stats table.

Definition at line 33 of file SiteStatsUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Deferred\SiteStatsUpdate::__construct (   $views,
  $edits,
  $good,
  $pages = 0,
  $users = 0 
)

Member Function Documentation

◆ cacheUpdate()

static MediaWiki\Deferred\SiteStatsUpdate::cacheUpdate ( IDatabase  $dbw)
static

◆ doUpdate()

◆ factory()

static MediaWiki\Deferred\SiteStatsUpdate::factory ( array  $deltas)
static
Parameters
int[]$deltasMap of (counter type => integer delta) e.g. SiteStatsUpdate::factory( [ 'edits' => 10, 'articles' => 2, 'pages' => 7, 'users' => 5, ] );
Returns
SiteStatsUpdate
Exceptions
UnexpectedValueException

Definition at line 90 of file SiteStatsUpdate.php.

◆ merge()

MediaWiki\Deferred\SiteStatsUpdate::merge ( MergeableUpdate  $update)

Merge this enqueued update with a new MergeableUpdate of the same qualified class name.

Parameters
MergeableUpdate$updateThe new update (having the same class)

Implements MediaWiki\Deferred\MergeableUpdate.

Definition at line 67 of file SiteStatsUpdate.php.

Member Data Documentation

◆ $articles

int MediaWiki\Deferred\SiteStatsUpdate::$articles = 0
protected

Definition at line 39 of file SiteStatsUpdate.php.

◆ $edits

int MediaWiki\Deferred\SiteStatsUpdate::$edits = 0
protected

Definition at line 35 of file SiteStatsUpdate.php.

Referenced by MediaWiki\Deferred\SiteStatsUpdate\__construct().

◆ $images

int MediaWiki\Deferred\SiteStatsUpdate::$images = 0
protected

Definition at line 43 of file SiteStatsUpdate.php.

◆ $pages

int MediaWiki\Deferred\SiteStatsUpdate::$pages = 0
protected

Definition at line 37 of file SiteStatsUpdate.php.

Referenced by MediaWiki\Deferred\SiteStatsUpdate\__construct().

◆ $users

int MediaWiki\Deferred\SiteStatsUpdate::$users = 0
protected

Definition at line 41 of file SiteStatsUpdate.php.

Referenced by MediaWiki\Deferred\SiteStatsUpdate\__construct().

◆ SHARDS_ON

const MediaWiki\Deferred\SiteStatsUpdate::SHARDS_ON = 10

Definition at line 46 of file SiteStatsUpdate.php.

Referenced by MediaWiki\Deferred\SiteStatsUpdate\doUpdate().


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