| @@ 1259-1277 (lines=19) @@ | ||
| 1256 | * {@inheritDoc} |
|
| 1257 | * |
|
| 1258 | */ |
|
| 1259 | public function getDecoratedConnection() |
|
| 1260 | { |
|
| 1261 | $options = $this->getOptions(); |
|
| 1262 | $options = [ |
|
| 1263 | 'username' => $options['user'], |
|
| 1264 | 'password' => $options['pass'], |
|
| 1265 | 'database' => $options['name'], |
|
| 1266 | 'quoteIdentifiers' => true, |
|
| 1267 | ] + $options; |
|
| 1268 | ||
| 1269 | $driver = new MysqlDriver($options); |
|
| 1270 | if (method_exists($driver, 'setConnection')) { |
|
| 1271 | $driver->setConnection($this->connection); |
|
| 1272 | } else { |
|
| 1273 | $driver->connection($this->connection); |
|
| 1274 | } |
|
| 1275 | ||
| 1276 | return new Connection(['driver' => $driver] + $options); |
|
| 1277 | } |
|
| 1278 | } |
|
| 1279 | ||
| @@ 1405-1424 (lines=20) @@ | ||
| 1402 | * {@inheritDoc} |
|
| 1403 | * |
|
| 1404 | */ |
|
| 1405 | public function getDecoratedConnection() |
|
| 1406 | { |
|
| 1407 | $options = $this->getOptions(); |
|
| 1408 | $options = [ |
|
| 1409 | 'username' => $options['user'], |
|
| 1410 | 'password' => $options['pass'], |
|
| 1411 | 'database' => $options['name'], |
|
| 1412 | 'quoteIdentifiers' => true, |
|
| 1413 | ] + $options; |
|
| 1414 | ||
| 1415 | $driver = new PostgresDriver($options); |
|
| 1416 | ||
| 1417 | if (method_exists($driver, 'setConnection')) { |
|
| 1418 | $driver->setConnection($this->connection); |
|
| 1419 | } else { |
|
| 1420 | $driver->connection($this->connection); |
|
| 1421 | } |
|
| 1422 | ||
| 1423 | return new Connection(['driver' => $driver] + $options); |
|
| 1424 | } |
|
| 1425 | } |
|
| 1426 | ||
| @@ 1254-1273 (lines=20) @@ | ||
| 1251 | * {@inheritDoc} |
|
| 1252 | * |
|
| 1253 | */ |
|
| 1254 | public function getDecoratedConnection() |
|
| 1255 | { |
|
| 1256 | $options = $this->getOptions(); |
|
| 1257 | $options = [ |
|
| 1258 | 'username' => $options['user'], |
|
| 1259 | 'password' => $options['pass'], |
|
| 1260 | 'database' => $options['name'], |
|
| 1261 | 'quoteIdentifiers' => true, |
|
| 1262 | ] + $options; |
|
| 1263 | ||
| 1264 | $driver = new SqlServerDriver($options); |
|
| 1265 | ||
| 1266 | if (method_exists($driver, 'setConnection')) { |
|
| 1267 | $driver->setConnection($this->connection); |
|
| 1268 | } else { |
|
| 1269 | $driver->connection($this->connection); |
|
| 1270 | } |
|
| 1271 | ||
| 1272 | return new Connection(['driver' => $driver] + $options); |
|
| 1273 | } |
|
| 1274 | } |
|
| 1275 | ||