MediaWiki REL1_34
AtomicSectionUpdate Class Reference

Deferrable Update for closure/callback updates via IDatabase::doAtomicSection() More...

Inheritance diagram for AtomicSectionUpdate:
Collaboration diagram for AtomicSectionUpdate:

Public Member Functions

 __construct (IDatabase $dbw, $fname, callable $callback, array $conns=[])
 
 cancelOnRollback ( $trigger)
 
 doUpdate ()
 Perform the actual work.
 
 getOrigin ()
 

Private Attributes

callable null $callback
 
IDatabase $dbw
 
string $fname
 

Detailed Description

Deferrable Update for closure/callback updates via IDatabase::doAtomicSection()

Since
1.27

Definition at line 9 of file AtomicSectionUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

AtomicSectionUpdate::__construct ( IDatabase  $dbw,
  $fname,
callable  $callback,
array  $conns = [] 
)
Parameters
IDatabase$dbwDB handle; update aborts if a transaction now this rolls back
string$fnameCaller name (usually METHOD)
callable$callback
IDatabase[]$connsAbort if a transaction now on one of these rolls back [optional]
See also
IDatabase::doAtomicSection()

Definition at line 24 of file AtomicSectionUpdate.php.

References Wikimedia\Rdbms\IDatabase\onTransactionResolution().

Member Function Documentation

◆ cancelOnRollback()

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

Definition at line 47 of file AtomicSectionUpdate.php.

◆ doUpdate()

AtomicSectionUpdate::doUpdate ( )

Perform the actual work.

Implements DeferrableUpdate.

Definition at line 37 of file AtomicSectionUpdate.php.

◆ getOrigin()

AtomicSectionUpdate::getOrigin ( )
Returns
string Originating method name

Implements DeferrableCallback.

Definition at line 53 of file AtomicSectionUpdate.php.

Member Data Documentation

◆ $callback

callable null AtomicSectionUpdate::$callback
private

Definition at line 15 of file AtomicSectionUpdate.php.

◆ $dbw

IDatabase AtomicSectionUpdate::$dbw
private

Definition at line 11 of file AtomicSectionUpdate.php.

◆ $fname

string AtomicSectionUpdate::$fname
private

Definition at line 13 of file AtomicSectionUpdate.php.


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