MediaWiki
master
StubUserLang.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\StubObject
;
22
23
use
MediaWiki\Context\RequestContext
;
24
use
MediaWiki\Language\Language
;
25
29
class
StubUserLang
extends
StubObject
{
30
31
public
function
__construct
() {
32
parent::__construct(
'wgLang'
);
33
}
34
38
// phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
39
public
function
_newObject
() {
40
return
RequestContext::getMain()->getLanguage();
41
}
42
}
43
45
class_alias( StubUserLang::class,
'StubUserLang'
);
MediaWiki\Context\RequestContext
Group all the pieces relevant to the context of a request into one instance.
Definition
RequestContext.php:68
MediaWiki\Language\Language
Base class for language-specific code.
Definition
Language.php:81
MediaWiki\StubObject\StubObject
Class to implement stub globals, which are globals that delay loading the their associated module cod...
Definition
StubObject.php:55
MediaWiki\StubObject\StubUserLang
Stub object for the user language.
Definition
StubUserLang.php:29
MediaWiki\StubObject\StubUserLang\_newObject
_newObject()
Definition
StubUserLang.php:39
MediaWiki\StubObject\StubUserLang\__construct
__construct()
Definition
StubUserLang.php:31
MediaWiki\StubObject
Definition
DeprecatedGlobal.php:23
includes
StubObject
StubUserLang.php
Generated on Wed Dec 18 2024 04:26:02 for MediaWiki by
1.10.0