MediaWiki  master
MWCallableUpdate Class Reference

Deferrable Update for closure/callback. More...

Inheritance diagram for MWCallableUpdate:
Collaboration diagram for MWCallableUpdate:

Public Member Functions

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

Private Attributes

callable null $callback
 Callback, or null if it was cancelled. More...
 
string $fname
 Calling method name. More...
 
int $trxRoundRequirement = self::TRX_ROUND_PRESENT
 One of the class TRX_ROUND_* constants. More...
 

Detailed Description

Deferrable Update for closure/callback.

Definition at line 8 of file MWCallableUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

MWCallableUpdate::__construct ( callable  $callback,
  $fname = 'unknown',
  $dbws = [] 
)
Parameters
callable$callback
string$fnameCalling method
IDatabase|IDatabase[]|null$dbws Abort if any of the specified DB handles have a currently pending transaction which later gets rolled back optional

Definition at line 24 of file MWCallableUpdate.php.

References $callback, and $fname.

Member Function Documentation

◆ cancelOnRollback()

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

Definition at line 46 of file MWCallableUpdate.php.

◆ doUpdate()

MWCallableUpdate::doUpdate ( )

Perform the actual work.

Implements DeferrableUpdate.

Definition at line 36 of file MWCallableUpdate.php.

◆ getOrigin()

MWCallableUpdate::getOrigin ( )
Returns
string Originating method name

Implements DeferrableCallback.

Definition at line 52 of file MWCallableUpdate.php.

References $fname.

◆ getTransactionRoundRequirement()

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

Implements TransactionRoundAwareUpdate.

Definition at line 64 of file MWCallableUpdate.php.

References $trxRoundRequirement.

◆ setTransactionRoundRequirement()

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

Definition at line 60 of file MWCallableUpdate.php.

Member Data Documentation

◆ $callback

callable null MWCallableUpdate::$callback
private

Callback, or null if it was cancelled.

Definition at line 12 of file MWCallableUpdate.php.

Referenced by __construct().

◆ $fname

string MWCallableUpdate::$fname
private

Calling method name.

Definition at line 14 of file MWCallableUpdate.php.

Referenced by __construct(), and getOrigin().

◆ $trxRoundRequirement

int MWCallableUpdate::$trxRoundRequirement = self::TRX_ROUND_PRESENT
private

One of the class TRX_ROUND_* constants.

Definition at line 16 of file MWCallableUpdate.php.

Referenced by getTransactionRoundRequirement().


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