function ConstantBasedDbConfig($name) { parent :: DbConfig($name); $this->driver = DB_DRIVER; $this->host = DB_HOST; $this->database = DB_NAME; $this->user = DB_USER; $this->password = DB_PASSWORD; }
function IniBasedDbConfig($name) { parent :: DbConfig($name); $toolkit =& Limb :: toolkit(); $ini =& $toolkit->getIni('common.ini'); $this->driver = $ini->getOption('driver', 'DB'); $this->host = $ini->getOption('host', 'DB'); $this->database = $ini->getOption('database', 'DB'); $this->user = $ini->getOption('user', 'DB'); $this->password = $ini->getOption('password', 'DB'); }