MediaWiki master
DataUpdate.php
Go to the documentation of this file.
1<?php
24namespace MediaWiki\Deferred;
25
32abstract class DataUpdate implements DeferrableUpdate {
34 protected $ticket;
36 protected $causeAction = 'unknown';
38 protected $causeAgent = 'unknown';
39
43 public function __construct() {
44 // noop
45 }
46
51 public function setTransactionTicket( $ticket ) {
52 $this->ticket = $ticket;
53 }
54
59 public function setCause( $action, $user ) {
60 $this->causeAction = $action;
61 $this->causeAgent = $user;
62 }
63
67 public function getCauseAction() {
68 return $this->causeAction;
69 }
70
74 public function getCauseAgent() {
75 return $this->causeAgent;
76 }
77
78}
79
81class_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.