"utf8mb4", 'host' => Arsse::$conf->dbMySQLHost, 'port' => Arsse::$conf->dbMySQLPort, 'dbname' => Arsse::$conf->dbMySQLDb, ]; foreach ($params as $k => $v) { $dsn[] = "$k=$v"; } $dsn = "mysql:".implode(";", $dsn); $d = new \PDO($dsn, Arsse::$conf->dbMySQLUser, Arsse::$conf->dbMySQLPass, [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, \PDO::MYSQL_ATTR_MULTI_STATEMENTS => false, ]); foreach (\JKingWeb\Arsse\Db\MySQL\PDODriver::makeSetupQueries() as $q) { $d->exec($q); } return $d; } catch (\Throwable $e) { return; } } public static function dbTableList($db): array { return MySQL::dbTableList($db); } public static function dbTruncate($db, array $afterStatements = []) { MySQL::dbTruncate($db, $afterStatements); } public static function dbRaze($db, array $afterStatements = []) { MySQL::dbRaze($db, $afterStatements); } }