|
MediaWiki
REL1_23
|
Class for handling updates to the site_stats table. More...


Public Member Functions | |
| __construct ($views, $edits, $good, $pages=0, $users=0) | |
| doUpdate () | |
| Perform the actual work. | |
| tryDBUpdateInternal () | |
| Do not call this outside of SiteStatsUpdate. | |
Static Public Member Functions | |
| static | cacheUpdate ($dbw) |
| static | factory (array $deltas) |
Protected Member Functions | |
| adjustPending ($type, $delta) | |
| Adjust the pending deltas for a stat type. | |
| appendUpdate (&$sql, $field, $delta) | |
| doUpdatePendingDeltas () | |
| getPendingDeltas () | |
| Get pending delta counters for each stat type. | |
| removePendingDeltas (array $pd) | |
| Reduce pending delta counters after updates have been applied. | |
Protected Attributes | |
| int | $articles = 0 |
| * | |
| int | $edits = 0 |
| * | |
| int | $images = 0 |
| * | |
| int | $pages = 0 |
| * | |
| int | $users = 0 |
| * | |
| int | $views = 0 |
| * | |
Private Member Functions | |
| getTypeCacheKey ($type, $sign) | |
Class for handling updates to the site_stats table.
Definition at line 24 of file SiteStatsUpdate.php.
| SiteStatsUpdate::__construct | ( | $ | views, |
| $ | edits, | ||
| $ | good, | ||
| $ | pages = 0, |
||
| $ | users = 0 |
||
| ) |
| SiteStatsUpdate::adjustPending | ( | $ | type, |
| $ | delta | ||
| ) | [protected] |
Adjust the pending deltas for a stat type.
Each stat type has two pending counters, one for increments and decrements
| string | $type | |
| int | $delta | Delta (positive or negative) |
Definition at line 198 of file SiteStatsUpdate.php.
| SiteStatsUpdate::appendUpdate | ( | &$ | sql, |
| $ | field, | ||
| $ | delta | ||
| ) | [protected] |
| string | $sql | |
| string | $field | |
| int | $delta |
Definition at line 170 of file SiteStatsUpdate.php.
| static SiteStatsUpdate::cacheUpdate | ( | $ | dbw | ) | [static] |
| DatabaseBase | $dbw |
Definition at line 129 of file SiteStatsUpdate.php.
Referenced by SiteStatsInit\doAllAndCommit(), SpecialStatistics\execute(), and InitSiteStats\execute().
Perform the actual work.
Implements DeferrableUpdate.
Definition at line 63 of file SiteStatsUpdate.php.
| SiteStatsUpdate::doUpdatePendingDeltas | ( | ) | [protected] |
Definition at line 156 of file SiteStatsUpdate.php.
| static SiteStatsUpdate::factory | ( | array $ | deltas | ) | [static] |
| SiteStatsUpdate::getPendingDeltas | ( | ) | [protected] |
Get pending delta counters for each stat type.
Definition at line 219 of file SiteStatsUpdate.php.
| SiteStatsUpdate::getTypeCacheKey | ( | $ | type, |
| $ | sign | ||
| ) | [private] |
| string | $type | |
| string | $sign | ('+' or '-') |
Definition at line 188 of file SiteStatsUpdate.php.
References wfMemcKey().
| SiteStatsUpdate::removePendingDeltas | ( | array $ | pd | ) | [protected] |
Reduce pending delta counters after updates have been applied.
| array | $pd | Result of getPendingDeltas(), used for DB update |
Definition at line 238 of file SiteStatsUpdate.php.
Do not call this outside of SiteStatsUpdate.
Definition at line 80 of file SiteStatsUpdate.php.
int SiteStatsUpdate::$articles = 0 [protected] |
*
Definition at line 31 of file SiteStatsUpdate.php.
int SiteStatsUpdate::$edits = 0 [protected] |
int SiteStatsUpdate::$images = 0 [protected] |
*
Definition at line 35 of file SiteStatsUpdate.php.
int SiteStatsUpdate::$pages = 0 [protected] |
int SiteStatsUpdate::$users = 0 [protected] |
int SiteStatsUpdate::$views = 0 [protected] |