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