MediaWiki master
rebuildmessages.php
Go to the documentation of this file.
1<?php
22require_once __DIR__ . '/Maintenance.php';
23
30 public function __construct() {
31 parent::__construct();
32 $this->addDescription( 'Purge the MessageCache for all interface languages.' );
33 }
34
35 public function execute() {
36 $this->output( "Purging message cache for all languages on this wiki..." );
37 $messageCache = $this->getServiceContainer()->getMessageCache();
38 $messageCache->clear();
39 $this->output( "Done\n" );
40 }
41}
42
43$maintClass = RebuildMessages::class;
44require_once RUN_MAINTENANCE_IF_MAIN;
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
output( $out, $channel=null)
Throw some output to the user.
getServiceContainer()
Returns the main service container.
addDescription( $text)
Set the description text.
Maintenance script that purges cache used by MessageCache.
execute()
Do the actual work.
__construct()
Default constructor.
$maintClass