MediaWiki
REL1_37
alltrans.php
Go to the documentation of this file.
1
<?php
24
use
MediaWiki\MediaWikiServices
;
25
26
require_once __DIR__ .
'/../Maintenance.php'
;
27
34
class
AllTrans
extends
Maintenance
{
35
36
public
function
__construct
() {
37
parent::__construct();
38
$this->
addDescription
(
'Get all messages as defined by the English language file'
);
39
}
40
41
public
function
execute
() {
42
$localisationCache = MediaWikiServices::getInstance()->getLocalisationCache();
43
$englishMessages = $localisationCache->getItem(
'en'
,
'messages'
);
44
foreach
( array_keys( $englishMessages ) as $key ) {
45
$this->
output
(
"$key\n"
);
46
}
47
}
48
}
49
50
$maintClass
= AllTrans::class;
51
require_once RUN_MAINTENANCE_IF_MAIN;
$maintClass
$maintClass
Definition
alltrans.php:50
AllTrans
Maintenance script that gets all messages as defined by the English language file.
Definition
alltrans.php:34
AllTrans\__construct
__construct()
Default constructor.
Definition
alltrans.php:36
AllTrans\execute
execute()
Do the actual work.
Definition
alltrans.php:41
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition
Maintenance.php:59
Maintenance\output
output( $out, $channel=null)
Throw some output to the user.
Definition
Maintenance.php:435
Maintenance\addDescription
addDescription( $text)
Set the description text.
Definition
Maintenance.php:329
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition
MediaWikiServices.php:190
maintenance
language
alltrans.php
Generated on Fri Apr 5 2024 23:41:21 for MediaWiki by
1.9.8