MediaWiki fundraising/REL1_35
DataUpdate.php
Go to the documentation of this file.
1<?php
30abstract class DataUpdate implements DeferrableUpdate {
32 protected $ticket;
34 protected $causeAction = 'unknown';
36 protected $causeAgent = 'unknown';
37
41 public function __construct() {
42 // noop
43 }
44
49 public function setTransactionTicket( $ticket ) {
50 $this->ticket = $ticket;
51 }
52
57 public function setCause( $action, $user ) {
58 $this->causeAction = $action;
59 $this->causeAgent = $user;
60 }
61
65 public function getCauseAction() {
66 return $this->causeAction;
67 }
68
72 public function getCauseAgent() {
73 return $this->causeAgent;
74 }
75
83 public static function runUpdates( array $updates ) {
84 foreach ( $updates as $update ) {
85 $update->doUpdate();
86 }
87 }
88}
Abstract base class for update jobs that do something with some secondary data extracted from article...
string $causeAction
Short update cause action description.
__construct()
Stable to call.
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.