Skip to content

Commit

Permalink
Merge pull request #60 from duvall/patch-2
Browse files Browse the repository at this point in the history
feat: charsetify me biatch ! :)
  • Loading branch information
Greg authored Apr 25, 2022
2 parents fb75393 + a481fe9 commit 35ca3e6
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 35ca3e6

Please sign in to comment.