00001 <?php 00008 class DbConfig 00009 { 00013 public function clearDSN() 00014 { 00015 return $this->_configurations = array(); 00016 } 00017 00039 public function setDSN($configName_, $dbType_, $hostip_, $username_, $password_, $dbName_) 00040 { 00041 $configName_ = strtolower($configName_); 00042 $this->_configurations[$configName_] = array 00043 ( 00044 'phptype' => $dbType_, 00045 'hostspec' => $hostip_, 00046 'username' => $username_, 00047 'password' => $password_, 00048 'database' => $dbName_ 00049 ); 00050 } 00051 00061 public function getDSN($configName_) 00062 { 00063 $configName_ = strtolower($configName_); 00064 return $this->_configurations[$configName_]; 00065 } 00066 00076 private $_configurations; 00077 } 00078 ?>