MediaWiki  master
HTMLCacheUpdate.php
Go to the documentation of this file.
1 <?php
22 
29 class HTMLCacheUpdate extends DataUpdate {
31  private $pageTo;
33  private $table;
34 
41  public function __construct(
42  PageReference $pageTo, $table, $causeAction = 'unknown', $causeAgent = 'unknown'
43  ) {
44  $this->pageTo = $pageTo;
45  $this->table = $table;
46  $this->causeAction = $causeAction;
47  $this->causeAgent = $causeAgent;
48  }
49 
50  public function doUpdate() {
52  $this->pageTo,
53  $this->table,
54  [ 'causeAction' => $this->getCauseAction(), 'causeAgent' => $this->getCauseAgent() ]
55  );
56  JobQueueGroup::singleton()->lazyPush( $job );
57  }
58 }
DataUpdate\getCauseAgent
getCauseAgent()
Definition: DataUpdate.php:72
DataUpdate\$causeAgent
string $causeAgent
Short update cause user description.
Definition: DataUpdate.php:36
HTMLCacheUpdate\$pageTo
PageReference $pageTo
Definition: HTMLCacheUpdate.php:31
Page\PageReference
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.
Definition: PageReference.php:49
DataUpdate
Abstract base class for update jobs that do something with some secondary data extracted from article...
Definition: DataUpdate.php:30
HTMLCacheUpdate\__construct
__construct(PageReference $pageTo, $table, $causeAction='unknown', $causeAgent='unknown')
Definition: HTMLCacheUpdate.php:41
HTMLCacheUpdate
HTML file cache invalidation all the pages linking to a given title.
Definition: HTMLCacheUpdate.php:29
HTMLCacheUpdate\doUpdate
doUpdate()
Perform the actual work.
Definition: HTMLCacheUpdate.php:50
HTMLCacheUpdateJob\newForBacklinks
static newForBacklinks(PageReference $page, $table, $params=[])
Definition: HTMLCacheUpdateJob.php:61
DataUpdate\$causeAction
string $causeAction
Short update cause action description.
Definition: DataUpdate.php:34
JobQueueGroup\singleton
static singleton( $domain=false)
Definition: JobQueueGroup.php:114
$job
if(count( $args)< 1) $job
Definition: recompressTracked.php:49
HTMLCacheUpdate\$table
string $table
Definition: HTMLCacheUpdate.php:33
DataUpdate\getCauseAction
getCauseAction()
Definition: DataUpdate.php:65