예제 #1
0
파일: db_chat.php 프로젝트: kritskiyp/chat
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
예제 #2
0
파일: app.php 프로젝트: kritskiyp/chat
 private function __construct()
 {
     $this->messages = new CMsgGroup();
     $this->db = CChatDB::getInstance();
     if ($this->db->connect_error) {
         die('Connect error (' . $this->db->connect_errno . ') ' . $this->db->connect_error);
     }
 }