예제 #1
0
	public function getIns(){
		if(!(self::$ins instanceof self)){
			self::$ins = new self();
		}

		return self::$ins;
	}
예제 #2
0
 public static function getIns()
 {
     if (self::$ins == false) {
         self::$ins = new self();
     }
     return self::$ins;
 }
예제 #3
0
파일: mysql.php 프로젝트: nowdence/test
 public static function getIns()
 {
     if (self::$ins === null) {
         self::$ins = new self();
     }
     $conf = conf::getIns();
     self::$ins->host = $conf->host;
     self::$ins->user = $conf->user;
     self::$ins->passwd = $conf->pwd;
     self::$ins->db = $conf->db;
     self::$ins->port = $conf->port;
     self::$ins->connect();
     self::$ins->select_db();
     self::$ins->setChar();
     return self::$ins;
 }