1: <?php
2: Class Conf{
3: private $_domain;
4: private $_userdb;
5: private $_passdb;
6: private $_hostdb;
7: private $_db;
8: private $_dbType;
9:
10: private static $_instance;
11:
12: private function __construct(){
13: require 'config.php';
14: $this->_domain=$domain;
15: $this->_userdb=$user;
16: $this->_passdb=$password;
17: $this->_hostdb=$host;
18: $this->_db=$db;
19: $this->_dbType=$dbType;
20: }
21:
22: private function __clone(){ }
23:
24: private function __wakeup(){ }
25:
26: public static function getInstance(){
27: if (!(self::$_instance instanceof self)){
28: self::$_instance=new self();
29: }
30: return self::$_instance;
31: }
32:
33: public function getUserDB(){
34: $var=$this->_userdb;
35: return $var;
36: }
37:
38: public function getHostDB(){
39: $var=$this->_hostdb;
40: return $var;
41: }
42:
43: public function getPassDB(){
44: $var=$this->_passdb;
45: return $var;
46: }
47:
48: public function getDB(){
49: $var=$this->_db;
50: return $var;
51: }
52:
53: public function getDBType(){
54: $var=$this->_dbType;
55: return $var;
56: }
57:
58: } ?>