From 13647d55bd8085a2b3a686b8aad3b28b0faf693a Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 7 Dec 2024 23:34:59 +0000 Subject: use a config.ini file for basic configuration --- WpfTest/Db.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'WpfTest/Db.php') diff --git a/WpfTest/Db.php b/WpfTest/Db.php index 3de1011..799332f 100644 --- a/WpfTest/Db.php +++ b/WpfTest/Db.php @@ -9,7 +9,8 @@ class Db extends Singleton { private \PDO $conn; protected function __construct() { - $this->conn = new \PDO('pgsql:host=localhost;dbname=wpftest', 'wpftest', 'wpftest', [ + $conf = GlobalConfig::getInstance(); + $this->conn = new \PDO($conf->getDbConnection(), $conf->getDbUser(), $conf->getDbPassword(), [ \PDO::ATTR_PERSISTENT => true, ]); } -- cgit v1.3