Skip to content

Commit

Permalink
feat: set charset ! :)
Browse files Browse the repository at this point in the history
  • Loading branch information
duvall authored Apr 21, 2022
1 parent fb75393 commit a481fe9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ExtendedServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ abstract class ExtendedServer
protected $user;
protected $password;
protected $dbname;
protected $charset;
protected $extraParams = [];
protected $driver;
protected $driverOptions;
Expand All @@ -31,14 +32,14 @@ public function __construct(array $params)
case 'user':
case 'password':
case 'dbname':
case 'charset':
case 'weight':
case 'driver':
case 'driverOptions':
$this->$key = $value;
break;
default:
throw new \Exception($key . ' = ' . $value);
$extraParams[$key] = $value;
}
}
}
Expand All @@ -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,
];
Expand Down Expand Up @@ -86,4 +88,4 @@ public function __destruct()
{
$this->close();
}
}
}

0 comments on commit a481fe9

Please sign in to comment.