MediaWiki  master
StubUserLang Class Reference

Stub object for the user language. More...

Inheritance diagram for StubUserLang:
Collaboration diagram for StubUserLang:

Public Member Functions

 __construct ()
 
 _newObject ()
 
 findVariantLink (&$link, &$nt, $ignoreOtherCond=false)
 Call Language::findVariantLink after unstubbing $wgLang. More...
 
- Public Member Functions inherited from StubObject
 __call ( $name, $args)
 Function called by PHP if no function with that name exists in this object. More...
 
 __construct ( $global=null, $class=null, $params=[])
 
 _call ( $name, $args)
 Function called if any function exists with that name in this object. More...
 
 _newObject ()
 Create a new object to replace this stub object. More...
 
 _unstub ( $name='_unstub', $level=2)
 This function creates a new object of the real class and replace it in the global variable. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from StubObject
static isRealObject ( $obj)
 Returns a bool value whenever $obj is a stub object. More...
 
static unstub (&$obj)
 Unstubs an object, if it is a stub object. More...
 
- Protected Attributes inherited from StubObject
null string $class
 
null callable $factory
 
null string $global
 
array $params
 

Detailed Description

Stub object for the user language.

Assigned to the $wgLang global.

Definition at line 24 of file StubUserLang.php.

Constructor & Destructor Documentation

◆ __construct()

StubUserLang::__construct ( )

Definition at line 26 of file StubUserLang.php.

Member Function Documentation

◆ _newObject()

StubUserLang::_newObject ( )
Returns
Language

Definition at line 51 of file StubUserLang.php.

References RequestContext\getMain().

◆ findVariantLink()

StubUserLang::findVariantLink ( $link,
$nt,
  $ignoreOtherCond = false 
)

Call Language::findVariantLink after unstubbing $wgLang.

This method is implemented with a full signature rather than relying on __call so that the pass-by-reference signature of the proxied method is honored.

Parameters
string&$linkThe name of the link
Title&$ntThe title object of the link
bool$ignoreOtherCondTo disable other conditions when we need to transclude a template or update a category's link

Definition at line 42 of file StubUserLang.php.

References $link, $wgLang, and StubObject\_unstub().


The documentation for this class was generated from the following file: