Prado\Util\TDbLogRoute::createDbConnection PHP Метод

createDbConnection() защищенный Метод

Creates the DB connection.
protected createDbConnection ( ) : TDbConnection
Результат Prado\Data\TDbConnection the created DB connection
    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;
        }
    }