Exemple #1
0
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Exemple #2
0
 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);
     }
 }