예제 #1
0
 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
파일: Webdev.php 프로젝트: afflicto/webdev
 /**
  * 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;
 }