Merge "fix some spacing"
[lhc/web/wiklou.git] / includes / StubObject.php
index 3f6b8b1..8a1e758 100644 (file)
@@ -1,4 +1,24 @@
 <?php
+/**
+ * Delayed loading of global objects.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
 
 /**
  * Class to implement stub globals, which are globals that delay loading the
@@ -52,6 +72,7 @@ class StubObject {
         *
         * @param $name String: name of the function called
         * @param $args Array: arguments
+        * @return mixed
         */
        function _call( $name, $args ) {
                $this->_unstub( $name, 5 );
@@ -72,6 +93,7 @@ class StubObject {
         *
         * @param $name String: name of the function called
         * @param $args Array: arguments
+        * @return mixed
         */
        function __call( $name, $args ) {
                return $this->_call( $name, $args );
@@ -86,6 +108,7 @@ class StubObject {
         * @param $name String: name of the method called in this object.
         * @param $level Integer: level to go in the stact trace to get the function
         *               who called this function.
+        * @throws MWException
         */
        function _unstub( $name = '_unstub', $level = 2 ) {
                static $recursionLevel = 0;
@@ -95,7 +118,7 @@ class StubObject {
                }
 
                if ( get_class( $GLOBALS[$this->mGlobal] ) != $this->mClass ) {
-                       $fname = __METHOD__.'-'.$this->mGlobal;
+                       $fname = __METHOD__ . '-' . $this->mGlobal;
                        wfProfileIn( $fname );
                        $caller = wfGetCaller( $level );
                        if ( ++$recursionLevel > 2 ) {
@@ -118,6 +141,7 @@ class StubObject {
 class StubContLang extends StubObject {
 
        function __construct() {
+               wfDeprecated( __CLASS__, '1.18' );
                parent::__construct( 'wgContLang' );
        }