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=ISQLPlatform::CALLER_UNKNOWN, $dependeeDbws=[])
 
 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 14 of file MWCallableUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Deferred\MWCallableUpdate::__construct ( callable $callback,
$fname = ISQLPlatform::CALLER_UNKNOWN,
$dependeeDbws = [] )
Parameters
callable$callbackOne of the following:
  • A Closure callback that takes the caller name as its argument
  • A non-Closure callback that takes no arguments
string$fnameCalling method
IDatabase | IDatabase[]$dependeeDbwsDB handles which might have pending writes upon which this update depends. If any of the handles already has an open transaction, a rollback thereof will cause this update to be cancelled (if it has not already run). [optional]

Definition at line 34 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 64 of file MWCallableUpdate.php.

◆ doUpdate()

MediaWiki\Deferred\MWCallableUpdate::doUpdate ( )

Perform the actual work.

Implements MediaWiki\Deferred\DeferrableUpdate.

Definition at line 50 of file MWCallableUpdate.php.

◆ getOrigin()

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

Implements MediaWiki\Deferred\DeferrableCallback.

Definition at line 70 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 81 of file MWCallableUpdate.php.

◆ setTransactionRoundRequirement()

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

Definition at line 77 of file MWCallableUpdate.php.


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