MediaWiki  master
UserEditCountUpdate Class Reference

Handles increment the edit count for a given set of users. More...

Inheritance diagram for UserEditCountUpdate:
Collaboration diagram for UserEditCountUpdate:

Public Member Functions

 __construct (UserIdentity $user, $increment)
 
 doUpdate ()
 Commits the provided user edit count increments to the database. More...
 
 merge (MergeableUpdate $update)
 Merge this enqueued update with a new MergeableUpdate of the same qualified class name. More...
 

Private Attributes

UserEditCountInfo[] $infoByUser
 We need to keep a single copy of the relevant UserIdentity to be able to pass to UserEditTracker. More...
 

Detailed Description

Handles increment the edit count for a given set of users.

Definition at line 31 of file UserEditCountUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

UserEditCountUpdate::__construct ( UserIdentity  $user,
  $increment 
)
Parameters
UserIdentity$user
int$increment

Definition at line 43 of file UserEditCountUpdate.php.

References MediaWiki\User\UserIdentity\getId(), and MediaWiki\User\UserIdentity\isRegistered().

Member Function Documentation

◆ doUpdate()

UserEditCountUpdate::doUpdate ( )

Commits the provided user edit count increments to the database.

Implements DeferrableUpdate.

Definition at line 69 of file UserEditCountUpdate.php.

References DB_PRIMARY, and if.

◆ merge()

UserEditCountUpdate::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 MergeableUpdate.

Definition at line 52 of file UserEditCountUpdate.php.

Member Data Documentation

◆ $infoByUser

UserEditCountInfo [] UserEditCountUpdate::$infoByUser
private

We need to keep a single copy of the relevant UserIdentity to be able to pass to UserEditTracker.

Map of (user ID => UserEditCountInfo)

Definition at line 37 of file UserEditCountUpdate.php.


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