MediaWiki
master
StubUserLang.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\StubObject
;
22
23
use
Language
;
24
use
RequestContext
;
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
47
class_alias( StubUserLang::class,
'StubUserLang'
);
Language
Base class for language-specific code.
Definition:
Language.php:61
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
RequestContext
Group all the pieces relevant to the context of a request into one instance.
Definition:
RequestContext.php:51
RequestContext\getMain
static getMain()
Get the RequestContext object associated with the main request.
Definition:
RequestContext.php:593
MediaWiki\StubObject
Definition:
DeprecatedGlobal.php:23
includes
StubObject
StubUserLang.php
Generated on Tue Sep 26 2023 20:24:06 for MediaWiki by
1.9.1