MediaWiki
REL1_40
rebuildmessages.php
Go to the documentation of this file.
1
<?php
22
use
MediaWiki\MediaWikiServices
;
23
24
require_once __DIR__ .
'/Maintenance.php'
;
25
31
class
RebuildMessages
extends
Maintenance
{
32
public
function
__construct
() {
33
parent::__construct();
34
$this->
addDescription
(
'Purge the MessageCache for all interface languages.'
);
35
}
36
37
public
function
execute
() {
38
$this->
output
(
"Purging message cache for all languages on this wiki..."
);
39
$messageCache = MediaWikiServices::getInstance()->getMessageCache();
40
$messageCache->clear();
41
$this->
output
(
"Done\n"
);
42
}
43
}
44
45
$maintClass
= RebuildMessages::class;
46
require_once RUN_MAINTENANCE_IF_MAIN;
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition
Maintenance.php:66
Maintenance\output
output( $out, $channel=null)
Throw some output to the user.
Definition
Maintenance.php:466
Maintenance\addDescription
addDescription( $text)
Set the description text.
Definition
Maintenance.php:340
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:223
RebuildMessages
Maintenance script that purges cache used by MessageCache.
Definition
rebuildmessages.php:31
RebuildMessages\execute
execute()
Do the actual work.
Definition
rebuildmessages.php:37
RebuildMessages\__construct
__construct()
Default constructor.
Definition
rebuildmessages.php:32
$maintClass
$maintClass
Definition
rebuildmessages.php:45
maintenance
rebuildmessages.php
Generated on Thu Jun 27 2024 14:05:04 for MediaWiki by
1.10.0