pdo = new PDO("sqlite:" . $dbFile); $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { throw new Exception('DB connection failed: ' . $e->getMessage()); } } public function getConnection() { return $this-pdo; } } ?>