Пример #1
0
 /**
  * Shut down, close connections and destroy the cached instance.
  * 
  */
 static function destroyInstance()
 {
     if (self::$instance) {
         self::$instance->shutdown();
         self::$instance->forEachLBCallMethod('closeAll');
         self::$instance = null;
     }
 }
Пример #2
0
 /**
  * Set the instance to be the given object
  *
  * @param LBFactory $instance
  */
 static function setInstance($instance)
 {
     self::destroyInstance();
     self::$instance = $instance;
 }