MediaWiki
REL1_35
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
;
RUN_MAINTENANCE_IF_MAIN
const RUN_MAINTENANCE_IF_MAIN
Definition
Maintenance.php:38
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition
Maintenance.php:55
Maintenance\output
output( $out, $channel=null)
Throw some output to the user.
Definition
Maintenance.php:432
Maintenance\addDescription
addDescription( $text)
Set the description text.
Definition
Maintenance.php:325
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition
MediaWikiServices.php:152
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 Sat Apr 6 2024 00:08:28 for MediaWiki by
1.9.8