MediaWiki master
MediaWiki\Deferred\MWCallableUpdate Class Reference

DeferrableUpdate for closure/callable. More...

Inherits MediaWiki\Deferred\DeferrableUpdate, MediaWiki\Deferred\DeferrableCallback, and MediaWiki\Deferred\TransactionRoundAwareUpdate.

Collaboration diagram for MediaWiki\Deferred\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 12 of file MWCallableUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Deferred\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 28 of file MWCallableUpdate.php.

Member Function Documentation

◆ cancelOnRollback()

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

Definition at line 50 of file MWCallableUpdate.php.

◆ doUpdate()

MediaWiki\Deferred\MWCallableUpdate::doUpdate ( )

Perform the actual work.

Implements MediaWiki\Deferred\DeferrableUpdate.

Definition at line 40 of file MWCallableUpdate.php.

◆ getOrigin()

MediaWiki\Deferred\MWCallableUpdate::getOrigin ( )
Returns
string Originating method name

Implements MediaWiki\Deferred\DeferrableCallback.

Definition at line 56 of file MWCallableUpdate.php.

◆ getTransactionRoundRequirement()

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

Implements MediaWiki\Deferred\TransactionRoundAwareUpdate.

Definition at line 68 of file MWCallableUpdate.php.

◆ setTransactionRoundRequirement()

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

Definition at line 64 of file MWCallableUpdate.php.


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