Public Member Functions | |
clearDSN () | |
Remove all database configurations. | |
setDSN ($configName_, $dbType_, $hostip_, $username_, $password_, $dbName_) | |
Set the database dsn:s that can be used. | |
getDSN ($configName_) | |
Get the dsn name to the database. | |
Private Attributes | |
$_configurations | |
Array list with dsn information. |
Definition at line 8 of file DbConfig.php.
DbConfig::clearDSN | ( | ) |
DbConfig::getDSN | ( | $ | configName_ | ) |
Get the dsn name to the database.
$configName_ | - string - The name of the database configuration. For more information see dbConfig::setDSN() |
Definition at line 61 of file DbConfig.php.
00062 { 00063 $configName_ = strtolower($configName_); 00064 return $this->_configurations[$configName_]; 00065 }
DbConfig::setDSN | ( | $ | configName_, | |
$ | dbType_, | |||
$ | hostip_, | |||
$ | username_, | |||
$ | password_, | |||
$ | dbName_ | |||
) |
Set the database dsn:s that can be used.
$configName_ | - string - Name of the configuration, doesn't need to be the same as the database name. | |
$dbType_ | - string - The database server type. | |
$hostip_ | - string - The ip number (or domain name) to the database server. | |
$username_ | - string - Username to the datbase server. | |
$password_ | - string - Password to the datbase server. | |
$dbName_ | - string - The name of the database in the database server. |
Definition at line 39 of file DbConfig.php.
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 }
DbConfig::$_configurations [private] |
Array list with dsn information.
$configurations['fomaster']['phptype'] = 'mysql; $configurations['fomaster']['hostspec'] = '192.168.2.250'; $configurations['fomaster']['username'] = 'username'; $configurations['fomaster']['password'] = 'xxx'; $configurations['fomaster']['database'] = 'foMaster';
Definition at line 76 of file DbConfig.php.