예제 #1
0
파일: Apc.php 프로젝트: JudonH/writer
 public static function get_instance($cache_id = '')
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
예제 #2
0
 /**
  * 单例模式
  *
  * 用于本类的单例模式(singleton)实例化
  *
  * @access public
  * @return object
  */
 public static function getInstance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }