diff --git a/src/ExtendedServer.php b/src/ExtendedServer.php index a3ea896..578eab5 100644 --- a/src/ExtendedServer.php +++ b/src/ExtendedServer.php @@ -13,6 +13,7 @@ abstract class ExtendedServer protected $user; protected $password; protected $dbname; + protected $charset; protected $extraParams = []; protected $driver; protected $driverOptions; @@ -31,6 +32,7 @@ public function __construct(array $params) case 'user': case 'password': case 'dbname': + case 'charset': case 'weight': case 'driver': case 'driverOptions': @@ -38,7 +40,6 @@ public function __construct(array $params) break; default: throw new \Exception($key . ' = ' . $value); - $extraParams[$key] = $value; } } } @@ -50,6 +51,7 @@ public function dbalConfig(): array { 'user' => $this->user, 'password' => $this->password, 'dbname' => $this->dbname, + 'charset' => $this->charset, 'driver' => $this->driver, 'driverOptions' => $this->driverOptions, ]; @@ -86,4 +88,4 @@ public function __destruct() { $this->close(); } -} \ No newline at end of file +}