public function db($conf = '')
{
$conf == '' && ($conf = $this->getDbConf());
if (is_array($conf)) {
$config = $conf;
$conf = md5(json_encode($conf));
} else {
$config = Config::get($conf);
}
$config['mark'] = $conf;
if (isset(self::$dbInstance[$conf])) {
return self::$dbInstance[$conf];
} else {
$pos = strpos($config['driver'], '.');
self::$dbInstance[$conf] = Cml::getContainer()->make('db_' . strtolower($pos ? substr($config['driver'], 0, $pos) : $config['driver']), $config);
return self::$dbInstance[$conf];
}
}