MediaWiki  1.28.1
AutoCommitUpdate Class Reference

Deferrable Update for closure/callback updates that should use auto-commit mode. More...

Inheritance diagram for AutoCommitUpdate:
Collaboration diagram for AutoCommitUpdate:

Public Member Functions

 __construct (IDatabase $dbw, $fname, callable $callback)
 
 cancelOnRollback ($trigger)
 
 doUpdate ()
 Perform the actual work. More...
 
 getOrigin ()
 

Private Attributes

callable null $callback
 
IDatabase $dbw
 
string $fname
 

Detailed Description

Deferrable Update for closure/callback updates that should use auto-commit mode.

Since
1.28

Definition at line 7 of file AutoCommitUpdate.php.

Constructor & Destructor Documentation

AutoCommitUpdate::__construct ( IDatabase  $dbw,
  $fname,
callable  $callback 
)
Parameters
IDatabase$dbw
string$fnameCaller name (usually METHOD)
callable$callbackCallback that takes (IDatabase, method name string)

Definition at line 20 of file AutoCommitUpdate.php.

References $callback, $dbw, and $fname.

Member Function Documentation

AutoCommitUpdate::cancelOnRollback (   $trigger)

Definition at line 51 of file AutoCommitUpdate.php.

AutoCommitUpdate::doUpdate ( )

Perform the actual work.

Implements DeferrableUpdate.

Definition at line 30 of file AutoCommitUpdate.php.

References $e, and DBO_TRX.

AutoCommitUpdate::getOrigin ( )
Returns
string Originating method name

Implements DeferrableCallback.

Definition at line 57 of file AutoCommitUpdate.php.

References $fname.

Member Data Documentation

callable null AutoCommitUpdate::$callback
private

Definition at line 13 of file AutoCommitUpdate.php.

Referenced by __construct().

IDatabase AutoCommitUpdate::$dbw
private

Definition at line 9 of file AutoCommitUpdate.php.

Referenced by __construct().

string AutoCommitUpdate::$fname
private

Definition at line 11 of file AutoCommitUpdate.php.

Referenced by __construct(), and getOrigin().


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