MediaWiki master
DataUpdate.php
Go to the documentation of this file.
1<?php
10namespace MediaWiki\Deferred;
11
18abstract class DataUpdate implements DeferrableUpdate {
20 protected $ticket;
22 protected $causeAction = 'unknown';
24 protected $causeAgent = 'unknown';
25
29 public function __construct() {
30 // noop
31 }
32
37 public function setTransactionTicket( $ticket ) {
38 $this->ticket = $ticket;
39 }
40
45 public function setCause( $action, $user ) {
46 $this->causeAction = $action;
47 $this->causeAgent = $user;
48 }
49
53 public function getCauseAction() {
54 return $this->causeAction;
55 }
56
60 public function getCauseAgent() {
61 return $this->causeAgent;
62 }
63
64}
65
67class_alias( DataUpdate::class, 'DataUpdate' );
Abstract base class for update jobs that do something with some secondary data extracted from article...
string $causeAction
Short update cause action description.
string $causeAgent
Short update cause user description.
mixed $ticket
Result from LBFactory::getEmptyTransactionTicket()
Interface that deferrable updates should implement.