MediaWiki master
StubUserLang.php
Go to the documentation of this file.
1<?php
2
3// phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
4
10namespace MediaWiki\StubObject;
11
14
18class 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}
Group all the pieces relevant to the context of a request into one instance.
Base class for language-specific code.
Definition Language.php:69
Class to implement stub globals, which are globals that delay loading the their associated module cod...
Stub object for the user language.