MediaWiki
REL1_22
|
00001 <?php 00029 class DeprecatedGlobal extends StubObject { 00030 // The m's are to stay consistent with parent class. 00031 protected $mRealValue, $mVersion; 00032 00033 function __construct( $name, $realValue, $version = false ) { 00034 parent::__construct( $name ); 00035 $this->mRealValue = $realValue; 00036 $this->mVersion = $version; 00037 } 00038 00039 function _newObject() { 00040 /* Put the caller offset for wfDeprecated as 6, as 00041 * that gives the function that uses this object, since: 00042 * 1 = this function ( _newObject ) 00043 * 2 = StubObject::_unstub 00044 * 3 = StubObject::_call 00045 * 4 = StubObject::__call 00046 * 5 = DeprecatedGlobal::<method of global called> 00047 * 6 = Actual function using the global. 00048 * Of course its theoretically possible to have other call 00049 * sequences for this method, but that seems to be 00050 * rather unlikely. 00051 */ 00052 wfDeprecated( '$' . $this->mGlobal, $this->mVersion, false, 6 ); 00053 return $this->mRealValue; 00054 } 00055 }