MediaWiki
master
StubUserLang.php
Go to the documentation of this file.
1
<?php
2
3
// phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
4
10
namespace
MediaWiki\StubObject
;
11
12
use
MediaWiki\Context\RequestContext
;
13
use
MediaWiki\Language\Language
;
14
18
class
StubUserLang
extends
StubObject
{
19
20
public
function
__construct
() {
21
parent::__construct(
'wgLang'
);
22
}
23
27
public
function
_newObject
() {
28
return
RequestContext::getMain()->getLanguage();
29
}
30
}
MediaWiki\Context\RequestContext
Group all the pieces relevant to the context of a request into one instance.
Definition
RequestContext.php:53
MediaWiki\Language\Language
Base class for language-specific code.
Definition
Language.php:69
MediaWiki\StubObject\StubObject
Class to implement stub globals, which are globals that delay loading the their associated module cod...
Definition
StubObject.php:42
MediaWiki\StubObject\StubUserLang
Stub object for the user language.
Definition
StubUserLang.php:18
MediaWiki\StubObject\StubUserLang\_newObject
_newObject()
Definition
StubUserLang.php:27
MediaWiki\StubObject\StubUserLang\__construct
__construct()
Definition
StubUserLang.php:20
MediaWiki\StubObject
Definition
DeprecatedGlobal.php:13
includes
StubObject
StubUserLang.php
Generated on Wed Nov 12 2025 02:27:50 for MediaWiki by
1.10.0