MediaWiki REL1_39
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 wfDeprecated( __METHOD__, '1.28' );
85 foreach ( $updates as $update ) {
86 $update->doUpdate();
87 }
88 }
89}
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
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.