예제 #1
0
파일: DB.php 프로젝트: eezhal92/not-gojek
 /**
  * Membuat instance kelas DB dengan pola Singleton
  *
  * @return DB
  */
 public function getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new DB();
     }
     return self::$_instance;
 }
예제 #2
0
파일: DB.php 프로젝트: Hometgar/ppe3
 public static function getInstance()
 {
     if (!self::$_instance) {
         // If no instance then make one
         self::$_instance = new self();
     }
     return self::$_instance;
 }