MediaWiki  1.23.15
ViewCountUpdate Class Reference

Update for the 'page_counter' field, when $wgDisableCounters is false. More...

Inheritance diagram for ViewCountUpdate:
Collaboration diagram for ViewCountUpdate:

Public Member Functions

 __construct ( $id)
 Constructor. More...
 
 doUpdate ()
 Run the update. More...
 

Protected Member Functions

 collect ()
 

Protected Attributes

int $id
 Page ID to increment the view count *. More...
 

Detailed Description

Update for the 'page_counter' field, when $wgDisableCounters is false.

Depending on $wgHitcounterUpdateFreq, this will directly increment the 'page_counter' field or use the 'hitcounter' table and then collect the data from that table to update the 'page_counter' field in a batch operation.

Definition at line 30 of file ViewCountUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

ViewCountUpdate::__construct (   $id)

Constructor.

Parameters
int$idPage ID to increment the view count

Definition at line 38 of file ViewCountUpdate.php.

References $id.

Member Function Documentation

◆ collect()

ViewCountUpdate::collect ( )
protected

Definition at line 71 of file ViewCountUpdate.php.

References array(), DB_MASTER, global, wfGetDB(), wfProfileIn(), and wfProfileOut().

Referenced by doUpdate().

◆ doUpdate()

ViewCountUpdate::doUpdate ( )

Run the update.

Implements DeferrableUpdate.

Definition at line 45 of file ViewCountUpdate.php.

References $e, array(), collect(), DB_MASTER, global, and wfGetDB().

Member Data Documentation

◆ $id

int ViewCountUpdate::$id
protected

Page ID to increment the view count *.

Definition at line 31 of file ViewCountUpdate.php.

Referenced by __construct().


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