MediaWiki
REL1_35
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
37
private
$localisationCache
;
38
39
public
function
__construct
() {
40
parent::__construct();
41
$this->
addDescription
(
'Get all messages as defined by the English language file'
);
42
$this->localisationCache = MediaWikiServices::getInstance()->getLocalisationCache();
43
}
44
45
public
function
execute
() {
46
$englishMessages = $this->localisationCache->getItem(
'en'
,
'messages'
);
47
foreach
( array_keys( $englishMessages ) as $key ) {
48
$this->
output
(
"$key\n"
);
49
}
50
}
51
}
52
53
$maintClass
= AllTrans::class;
54
require_once
RUN_MAINTENANCE_IF_MAIN
;
RUN_MAINTENANCE_IF_MAIN
const RUN_MAINTENANCE_IF_MAIN
Definition
Maintenance.php:38
$maintClass
$maintClass
Definition
alltrans.php:53
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:39
AllTrans\$localisationCache
LocalisationCache $localisationCache
Definition
alltrans.php:37
AllTrans\execute
execute()
Do the actual work.
Definition
alltrans.php:45
LocalisationCache
Class for caching the contents of localisation files, Messages*.php and *.i18n.php.
Definition
LocalisationCache.php:43
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
maintenance
language
alltrans.php
Generated on Sat Apr 6 2024 00:08:25 for MediaWiki by
1.9.8