MediaWiki  1.23.2
DeprecatedGlobal Class Reference

Class to allow throwing wfDeprecated warnings when people use globals that we do not want them to. More...

Inheritance diagram for DeprecatedGlobal:
Collaboration diagram for DeprecatedGlobal:

Public Member Functions

 __construct ( $name, $realValue, $version=false)
 Constructor. More...
 
 _newObject ()
 Create a new object to replace this stub object. 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...
 
 _call ( $name, $args)
 Function called if any function exists with that name in this 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...
 

Public Attributes

 $mVersion
 
- Public Attributes inherited from StubObject
 $mClass
 
 $mGlobal
 
 $mParams
 

Protected Attributes

 $mRealValue
 

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...
 

Detailed Description

Class to allow throwing wfDeprecated warnings when people use globals that we do not want them to.

Definition at line 28 of file DeprecatedGlobal.php.

Constructor & Destructor Documentation

◆ __construct()

DeprecatedGlobal::__construct (   $global,
  $class,
  $params = false 
)

Constructor.

Parameters
string$globalname of the global variable.
string$classname of the class of the real object.
array$paramsparameters to pass to constructor of the real object.

Reimplemented from StubObject.

Definition at line 32 of file DeprecatedGlobal.php.

References $name, and $version.

Member Function Documentation

◆ _newObject()

DeprecatedGlobal::_newObject ( )

Create a new object to replace this stub object.

Returns
object

Reimplemented from StubObject.

Definition at line 38 of file DeprecatedGlobal.php.

References $mRealValue, and wfDeprecated().

Member Data Documentation

◆ $mRealValue

DeprecatedGlobal::$mRealValue
protected

Definition at line 30 of file DeprecatedGlobal.php.

Referenced by _newObject().

◆ $mVersion

DeprecatedGlobal::$mVersion

Definition at line 30 of file DeprecatedGlobal.php.


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