コード例 #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;
 }