12use InvalidArgumentException;
34 parent::__construct(
'wgUser' );
76 self::$destructorDeprecationDisarmed =
true;
81 self::$destructorDeprecationDisarmed =
false;
94 return $globalUser->realUser;
95 } elseif ( $globalUser instanceof
User ) {
98 throw new InvalidArgumentException(
99 '$globalUser must be a User (or MediaWiki\StubObject\StubGlobalUser), got ' .
100 get_debug_type( $globalUser )
123 public function _unstub( $name =
'_unstub', $level = 2 ) {
124 if ( !$GLOBALS[$this->global] instanceof
self ) {
125 return $GLOBALS[$this->global];
129 wfDebug(
"Unstubbing \${$this->global} on call of "
130 .
"\${$this->global}::$name from $caller" );
131 $GLOBALS[$this->global] = $this->_newObject();
132 return $GLOBALS[$this->global];
136 if ( !self::$destructorDeprecationDisarmed ) {
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfGetCaller( $level=2)
Get the name of the function which called this function wfGetCaller( 1 ) is the function with the wfG...
wfDeprecatedMsg( $msg, $version=false, $component=false, $callerOffset=2)
Log a deprecation warning with arbitrary message text.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
if(!defined('MW_SETUP_CALLBACK'))