}
function _newObject() {
+ /* Put the caller offset for wfDeprecated as 6, as
+ * that gives the function that uses this object, since:
+ * 1 = this function ( _newObject )
+ * 2 = StubObject::_unstub
+ * 3 = StubObject::_call
+ * 4 = StubObject::__call
+ * 5 = DeprecatedGlobal::<method of global called>
+ * 6 = Actual function using the global.
+ * Of course its theoretically possible to have other call
+ * sequences for this method, but that seems to be
+ * rather unlikely.
+ */
wfDeprecated( '$' . $this->mGlobal, $this->mVersion, false, 6 );
return $this->mRealValue;
}
* @param $function String
* @param $version String|bool: Version of MediaWiki that the function was deprecated in (Added in 1.19).
* @param $component String|bool: Added in 1.19.
- * @param $callerOffset integer: How far up the callstack is the original caller (Added in 1.20)
+ * @param $callerOffset integer: How far up the callstack is the original
+ * caller. 2 = function that called the function that called
+ * wfDeprecated (Added in 1.20)
*
* @return null
*/