MediaWiki master
rebuildmessages.php
Go to the documentation of this file.
1<?php
9
10// @codeCoverageIgnoreStart
11require_once __DIR__ . '/Maintenance.php';
12// @codeCoverageIgnoreEnd
13
20 public function __construct() {
21 parent::__construct();
22 $this->addDescription( 'Purge the MessageCache for all interface languages.' );
23 }
24
25 public function execute() {
26 $this->output( "Purging message cache for all languages on this wiki..." );
27 $messageCache = $this->getServiceContainer()->getMessageCache();
28 $messageCache->clear();
29 $this->output( "Done\n" );
30 }
31}
32
33// @codeCoverageIgnoreStart
34$maintClass = RebuildMessages::class;
35require_once RUN_MAINTENANCE_IF_MAIN;
36// @codeCoverageIgnoreEnd
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