protected function createDbConnection()
{
if ($this->_connID !== '') {
$config = $this->getApplication()->getModule($this->_connID);
if ($config instanceof TDataSourceConfig) {
return $config->getDbConnection();
} else {
throw new TConfigurationException('dblogroute_connectionid_invalid', $this->_connID);
}
} else {
$db = new TDbConnection();
// default to SQLite3 database
$dbFile = $this->getApplication()->getRuntimePath() . '/sqlite3.log';
$db->setConnectionString('sqlite:' . $dbFile);
return $db;
}
}