예제 #1
0
파일: database.php 프로젝트: huang-sh/MVC
 public static function &getSingleton()
 {
     if (!self::$_instance instanceof self) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
예제 #2
0
파일: models.php 프로젝트: huang-sh/MVC
 protected function init_mysql()
 {
     require_once SYS_DB . '/database.php';
     $this->db = Sys_database::getSingleton();
 }