Fix function level comments that start with /* not /**
[lhc/web/wiklou.git] / includes / db / LBFactory.php
index 89a99d0..3e2e453 100644 (file)
  * @ingroup Database
  */
 abstract class LBFactory {
+
+       /**
+        * @var LBFactory
+        */
        static $instance;
 
        /**
@@ -22,14 +26,6 @@ abstract class LBFactory {
                self::$instance = new LBFactory_Fake( $wgLBFactoryConf );
        }
 
-       /**
-        * Resets the singleton for use if it's been disabled. Does nothing otherwise
-        */
-       public static function enableBackend() {
-               if( self::$instance instanceof LBFactory_Fake )
-                       self::$instance = null;
-       }
-
        /**
         * Get an LBFactory instance
         */
@@ -54,6 +50,14 @@ abstract class LBFactory {
                }
        }
 
+       /**
+        * Set the instance to be the given object
+        */
+       static function setInstance( $instance ) {
+               self::destroyInstance();
+               self::$instance = $instance;
+       }
+
        /**
         * Construct a factory based on a configuration array (typically from $wgLBFactoryConf)
         */
@@ -76,7 +80,7 @@ abstract class LBFactory {
         */
        abstract function getMainLB( $wiki = false );
 
-       /*
+       /**
         * Create a new load balancer for external storage. The resulting object will be
         * untracked, not chronology-protected, and the caller is responsible for
         * cleaning it up.
@@ -86,7 +90,7 @@ abstract class LBFactory {
         */
        abstract function newExternalLB( $cluster, $wiki = false );
 
-       /*
+       /**
         * Get a cached (tracked) load balancer for external storage
         *
         * @param $cluster String: external storage cluster, or false for core
@@ -133,6 +137,10 @@ abstract class LBFactory {
  * A simple single-master LBFactory that gets its configuration from the b/c globals
  */
 class LBFactory_Simple extends LBFactory {
+
+       /**
+        * @var LoadBalancer
+        */
        var $mainLB;
        var $extLBs = array();