MediaWiki  master
TransactionRoundDefiningUpdate.php
Go to the documentation of this file.
1 <?php
2 
10 {
12  private $callback;
14  private $fname;
15 
20  public function __construct( callable $callback, $fname = 'unknown' ) {
21  $this->callback = $callback;
22  $this->fname = $fname;
23  }
24 
25  public function doUpdate() {
26  call_user_func( $this->callback );
27  }
28 
29  public function getOrigin() {
30  return $this->fname;
31  }
32 
37  final public function getTransactionRoundRequirement() {
38  return self::TRX_ROUND_ABSENT;
39  }
40 }
DeferrableCallback
Callback wrapper that has an originating method.
Definition: DeferrableCallback.php:10
TransactionRoundAwareUpdate
Deferrable update that specifies whether it must run outside of any explicit LBFactory transaction ro...
Definition: TransactionRoundAwareUpdate.php:11
TransactionRoundDefiningUpdate\$callback
callable null $callback
Definition: TransactionRoundDefiningUpdate.php:12
TransactionRoundDefiningUpdate\getOrigin
getOrigin()
Definition: TransactionRoundDefiningUpdate.php:29
TransactionRoundDefiningUpdate\$fname
string $fname
Definition: TransactionRoundDefiningUpdate.php:14
TransactionRoundDefiningUpdate
Deferrable update that must run outside of any explicit LBFactory transaction round.
Definition: TransactionRoundDefiningUpdate.php:10
DeferrableUpdate
Interface that deferrable updates should implement.
Definition: DeferrableUpdate.php:11
TransactionRoundDefiningUpdate\doUpdate
doUpdate()
Perform the actual work.
Definition: TransactionRoundDefiningUpdate.php:25
TransactionRoundDefiningUpdate\getTransactionRoundRequirement
getTransactionRoundRequirement()
Definition: TransactionRoundDefiningUpdate.php:37
TransactionRoundDefiningUpdate\__construct
__construct(callable $callback, $fname='unknown')
Definition: TransactionRoundDefiningUpdate.php:20