MediaWiki master
StubUserLang.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\StubObject;
22
23use Language;
25
29class 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
45class_alias( StubUserLang::class, 'StubUserLang' );
Base class for language-specific code.
Definition Language.php:65
Group all the pieces relevant to the context of a request into one instance.
Class to implement stub globals, which are globals that delay loading the their associated module cod...
Stub object for the user language.