22 private $trxRoundRequirement = self::TRX_ROUND_PRESENT;
36 $fname = ISQLPlatform::CALLER_UNKNOWN,
39 $this->callback = $callback;
40 $this->fname = $fname;
42 $dependeeDbws = is_array( $dependeeDbws ) ? $dependeeDbws : [ $dependeeDbws ];
43 foreach ( $dependeeDbws as $dbw ) {
44 if ( $dbw->trxLevel() ) {
51 if ( $this->callback instanceof Closure ) {
52 ( $this->callback )( $this->fname );
53 } elseif ( $this->callback ) {
56 ( $this->callback )();
65 if ( $trigger === IDatabase::TRIGGER_ROLLBACK ) {
66 $this->callback =
null;
79 $this->trxRoundRequirement = $mode;
84 return $this->trxRoundRequirement;
89class_alias( MWCallableUpdate::class,
'MWCallableUpdate' );