Subversion Repositories PHPX

Compare Revisions

Last modification

Ignore whitespace Rev 67 → Rev 68

/trunk/Db/Database.php
152,9 → 152,9
* were set. That is, definitions in the class file
* override those in the configuration file.
*
* @return boolean|array
* <code>true</code> if the configuration
* file could be read, the configuration array otherwise.
* @return array|boolean
* The configuration array if the configuration
* file could be read, <code>false</code> otherwise.
*/
public function readConfig ()
{
165,7 → 165,11
if (isset($config[$section]))
{
$dbconfig = $config[$section];
foreach (array('host', 'dbname', 'username', 'password', 'charset') as $key)
$options = array(
'host', 'port', 'dbname', 'username', 'password', 'charset'
);
 
foreach ($options as $key)
{
$property = "_$key";
if (isset($dbconfig[$key])
176,6 → 180,8
$this->$property = $dbconfig[$key];
}
}
 
return $config[$section];
}
}