DbConfig Class Reference
[Config]

Holds login information to the database server. More...

List of all members.

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.


Detailed Description

Holds login information to the database server.

Author:
Daniel Lindh <[email protected]>

Definition at line 8 of file DbConfig.php.


Member Function Documentation

DbConfig::clearDSN (  ) 

Remove all database configurations.

Definition at line 13 of file DbConfig.php.

00014   {
00015     return $this->_configurations = array();
00016   }

DbConfig::getDSN ( configName_  ) 

Get the dsn name to the database.

Parameters:
$configName_ - string - The name of the database configuration. For more information see dbConfig::setDSN()
Returns:
array An array with DB DSN info.

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.

Parameters:
$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   }


Member Data Documentation

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.


The documentation for this class was generated from the following file:

Generated on Wed May 6 23:28:24 2009 for fareofficelib by  doxygen 1.5.8