Esempio n. 1
0
 /**
  * Membuat instance kelas DB dengan pola Singleton
  *
  * @return DB
  */
 public function getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new DB();
     }
     return self::$_instance;
 }
Esempio n. 2
0
File: DB.php Progetto: Hometgar/ppe3
 public static function getInstance()
 {
     if (!self::$_instance) {
         // If no instance then make one
         self::$_instance = new self();
     }
     return self::$_instance;
 }