public static function getInstance()
 {
     if (null === static::$__instance) {
         static::$__instance = new static();
     }
     return static::$__instance;
 }
示例#2
0
文件: CBase.php 项目: nbaiwan/yav
 public static function inst()
 {
     if (static::$__instance === null) {
         static::$__instance = new static::$__model();
     }
     return static::$__instance;
 }
示例#3
0
 /**
  * Singleton.
  * @return Webdev
  */
 public static function getInstance()
 {
     if (!isset(static::$__instance)) {
         static::$__instance = new Webdev();
     }
     return static::$__instance;
 }
示例#4
0
文件: Debug.php 项目: alkemann/AL13
 /**
  * Get the singleton instance
  *
  * @return al13_debug\util\Debug
  */
 public static function get_instance()
 {
     if (!static::$__instance) {
         $class = __CLASS__;
         static::$__instance = new $class();
     }
     return static::$__instance;
 }