MediaWiki master
rebuildmessages.php
Go to the documentation of this file.
1<?php
23
24// @codeCoverageIgnoreStart
25require_once __DIR__ . '/Maintenance.php';
26// @codeCoverageIgnoreEnd
27
34 public function __construct() {
35 parent::__construct();
36 $this->addDescription( 'Purge the MessageCache for all interface languages.' );
37 }
38
39 public function execute() {
40 $this->output( "Purging message cache for all languages on this wiki..." );
41 $messageCache = $this->getServiceContainer()->getMessageCache();
42 $messageCache->clear();
43 $this->output( "Done\n" );
44 }
45}
46
47// @codeCoverageIgnoreStart
48$maintClass = RebuildMessages::class;
49require_once RUN_MAINTENANCE_IF_MAIN;
50// @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