Ruckusing_Adapter_Sqlite3_Base::db_connect PHP Method

db_connect() private method

private db_connect ( $dsn ) : boolean
$dsn
return boolean
    private function db_connect($dsn)
    {
        if (!class_exists('SQLite3')) {
            throw new Ruckusing_Exception("\nIt appears you have not compiled PHP with SQLite3 support: missing class SQLite3", Ruckusing_Exception::INVALID_CONFIG);
        }
        $db_info = $this->get_dsn();
        if ($db_info) {
            $this->db_info = $db_info;
            try {
                $this->sqlite3 = new SQLite3($db_info['database']);
            } catch (Exception $e) {
                throw new Ruckusing_Exception("Could not connect to the DB, check database name.\nReason: " . $e->getMessage(), Ruckusing_Exception::INVALID_CONFIG, $e);
            }
            return true;
        } else {
            throw new Ruckusing_Exception("\n\nCould not extract DB connection information from: {$dsn}\n\n", Ruckusing_Exception::INVALID_CONFIG);
        }
    }