MediaWiki REL1_34
DataUpdate.php
Go to the documentation of this file.
1<?php
28abstract class DataUpdate implements DeferrableUpdate {
30 protected $ticket;
32 protected $causeAction = 'unknown';
34 protected $causeAgent = 'unknown';
35
36 public function __construct() {
37 // noop
38 }
39
44 public function setTransactionTicket( $ticket ) {
45 $this->ticket = $ticket;
46 }
47
52 public function setCause( $action, $user ) {
53 $this->causeAction = $action;
54 $this->causeAgent = $user;
55 }
56
60 public function getCauseAction() {
61 return $this->causeAction;
62 }
63
67 public function getCauseAgent() {
68 return $this->causeAgent;
69 }
70
78 public static function runUpdates( array $updates ) {
79 foreach ( $updates as $update ) {
80 $update->doUpdate();
81 }
82 }
83}
Abstract base class for update jobs that do something with some secondary data extracted from article...
string $causeAction
Short update cause action description.
mixed $ticket
Result from LBFactory::getEmptyTransactionTicket()
static runUpdates(array $updates)
Convenience method, calls doUpdate() on every DataUpdate in the array.
setCause( $action, $user)
setTransactionTicket( $ticket)
string $causeAgent
Short update cause user description.
Interface that deferrable updates should implement.