diff options
| author | winter | 2024-12-07 23:34:59 +0000 |
|---|---|---|
| committer | winter | 2024-12-07 23:34:59 +0000 |
| commit | 13647d55bd8085a2b3a686b8aad3b28b0faf693a (patch) | |
| tree | 90e2ec3fbad4320c95d7631908607819bf055073 /WpfTest/Db.php | |
| parent | a84232811dadccf7047424f27340a7f9847bedff (diff) | |
use a config.ini file for basic configuration
Diffstat (limited to 'WpfTest/Db.php')
| -rw-r--r-- | WpfTest/Db.php | 3 |
1 files changed, 2 insertions, 1 deletions
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, ]); } |
