MediaWiki 1.41.2
MWCallableUpdate Class Reference

DeferrableUpdate for closure/callable. More...

Inherits DeferrableUpdate, DeferrableCallback, and TransactionRoundAwareUpdate.

Collaboration diagram for MWCallableUpdate:

Public Member Functions

 __construct (callable $callback, $fname='unknown', $dbws=[])
 
 cancelOnRollback ( $trigger)
 
 doUpdate ()
 Perform the actual work.
 
 getOrigin ()
 
 getTransactionRoundRequirement ()
 
 setTransactionRoundRequirement ( $mode)
 

Detailed Description

DeferrableUpdate for closure/callable.

Access: internal
Use DeferredUpdates::addCallableUpdate instead

Definition at line 10 of file MWCallableUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

MWCallableUpdate::__construct ( callable $callback,
$fname = 'unknown',
$dbws = [] )
Parameters
callable$callback
string$fnameCalling method
IDatabase | IDatabase[] | null$dbwsCancel the update if a DB transaction is rolled back [optional] (since 1.28)

Definition at line 26 of file MWCallableUpdate.php.

Member Function Documentation

◆ cancelOnRollback()

MWCallableUpdate::cancelOnRollback ( $trigger)
Access: internal
This method is public so that it works with onTransactionResolution()
Parameters
int$trigger

Definition at line 48 of file MWCallableUpdate.php.

◆ doUpdate()

MWCallableUpdate::doUpdate ( )

Perform the actual work.

Implements DeferrableUpdate.

Definition at line 38 of file MWCallableUpdate.php.

◆ getOrigin()

MWCallableUpdate::getOrigin ( )
Returns
string Originating method name

Implements DeferrableCallback.

Definition at line 54 of file MWCallableUpdate.php.

◆ getTransactionRoundRequirement()

MWCallableUpdate::getTransactionRoundRequirement ( )
Returns
int One of the class TRX_ROUND_* constants

Implements TransactionRoundAwareUpdate.

Definition at line 66 of file MWCallableUpdate.php.

◆ setTransactionRoundRequirement()

MWCallableUpdate::setTransactionRoundRequirement ( $mode)
Since
1.34
Parameters
int$modeOne of the class TRX_ROUND_* constants

Definition at line 62 of file MWCallableUpdate.php.


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