| @@ 1295-1313 (lines=19) @@ | ||
| 1292 | /** |
|
| 1293 | * @inheritDoc |
|
| 1294 | */ |
|
| 1295 | public function getDecoratedConnection() |
|
| 1296 | { |
|
| 1297 | $options = $this->getOptions(); |
|
| 1298 | $options = [ |
|
| 1299 | 'username' => $options['user'], |
|
| 1300 | 'password' => $options['pass'], |
|
| 1301 | 'database' => $options['name'], |
|
| 1302 | 'quoteIdentifiers' => true, |
|
| 1303 | ] + $options; |
|
| 1304 | ||
| 1305 | $driver = new MysqlDriver($options); |
|
| 1306 | if (method_exists($driver, 'setConnection')) { |
|
| 1307 | $driver->setConnection($this->connection); |
|
| 1308 | } else { |
|
| 1309 | $driver->connection($this->connection); |
|
| 1310 | } |
|
| 1311 | ||
| 1312 | return new Connection(['driver' => $driver] + $options); |
|
| 1313 | } |
|
| 1314 | } |
|
| 1315 | ||
| @@ 1430-1449 (lines=20) @@ | ||
| 1427 | /** |
|
| 1428 | * @inheritDoc |
|
| 1429 | */ |
|
| 1430 | public function getDecoratedConnection() |
|
| 1431 | { |
|
| 1432 | $options = $this->getOptions(); |
|
| 1433 | $options = [ |
|
| 1434 | 'username' => $options['user'], |
|
| 1435 | 'password' => $options['pass'], |
|
| 1436 | 'database' => $options['name'], |
|
| 1437 | 'quoteIdentifiers' => true, |
|
| 1438 | ] + $options; |
|
| 1439 | ||
| 1440 | $driver = new PostgresDriver($options); |
|
| 1441 | ||
| 1442 | if (method_exists($driver, 'setConnection')) { |
|
| 1443 | $driver->setConnection($this->connection); |
|
| 1444 | } else { |
|
| 1445 | $driver->connection($this->connection); |
|
| 1446 | } |
|
| 1447 | ||
| 1448 | return new Connection(['driver' => $driver] + $options); |
|
| 1449 | } |
|
| 1450 | } |
|
| 1451 | ||
| @@ 1307-1326 (lines=20) @@ | ||
| 1304 | /** |
|
| 1305 | * @inheritDoc |
|
| 1306 | */ |
|
| 1307 | public function getDecoratedConnection() |
|
| 1308 | { |
|
| 1309 | $options = $this->getOptions(); |
|
| 1310 | $options = [ |
|
| 1311 | 'username' => $options['user'], |
|
| 1312 | 'password' => $options['pass'], |
|
| 1313 | 'database' => $options['name'], |
|
| 1314 | 'quoteIdentifiers' => true, |
|
| 1315 | ] + $options; |
|
| 1316 | ||
| 1317 | $driver = new SqlServerDriver($options); |
|
| 1318 | ||
| 1319 | if (method_exists($driver, 'setConnection')) { |
|
| 1320 | $driver->setConnection($this->connection); |
|
| 1321 | } else { |
|
| 1322 | $driver->connection($this->connection); |
|
| 1323 | } |
|
| 1324 | ||
| 1325 | return new Connection(['driver' => $driver] + $options); |
|
| 1326 | } |
|
| 1327 | } |
|
| 1328 | ||