| @@ 1132-1150 (lines=19) @@ | ||
| 1129 | * {@inheritDoc} |
|
| 1130 | * |
|
| 1131 | */ |
|
| 1132 | public function getDecoratedConnection() |
|
| 1133 | { |
|
| 1134 | $options = $this->getOptions(); |
|
| 1135 | $options = [ |
|
| 1136 | 'username' => $options['user'], |
|
| 1137 | 'password' => $options['pass'], |
|
| 1138 | 'database' => $options['name'], |
|
| 1139 | 'quoteIdentifiers' => true, |
|
| 1140 | ] + $options; |
|
| 1141 | ||
| 1142 | $driver = new MysqlDriver($options); |
|
| 1143 | if (method_exists($driver, 'setConnection')) { |
|
| 1144 | $driver->setConnection($this->connection); |
|
| 1145 | } else { |
|
| 1146 | $driver->connection($this->connection); |
|
| 1147 | } |
|
| 1148 | ||
| 1149 | return new Connection(['driver' => $driver] + $options); |
|
| 1150 | } |
|
| 1151 | } |
|
| 1152 | ||
| @@ 1273-1292 (lines=20) @@ | ||
| 1270 | * {@inheritDoc} |
|
| 1271 | * |
|
| 1272 | */ |
|
| 1273 | public function getDecoratedConnection() |
|
| 1274 | { |
|
| 1275 | $options = $this->getOptions(); |
|
| 1276 | $options = [ |
|
| 1277 | 'username' => $options['user'], |
|
| 1278 | 'password' => $options['pass'], |
|
| 1279 | 'database' => $options['name'], |
|
| 1280 | 'quoteIdentifiers' => true, |
|
| 1281 | ] + $options; |
|
| 1282 | ||
| 1283 | $driver = new PostgresDriver($options); |
|
| 1284 | ||
| 1285 | if (method_exists($driver, 'setConnection')) { |
|
| 1286 | $driver->setConnection($this->connection); |
|
| 1287 | } else { |
|
| 1288 | $driver->connection($this->connection); |
|
| 1289 | } |
|
| 1290 | ||
| 1291 | return new Connection(['driver' => $driver] + $options); |
|
| 1292 | } |
|
| 1293 | } |
|
| 1294 | ||
| @@ 1150-1169 (lines=20) @@ | ||
| 1147 | * {@inheritDoc} |
|
| 1148 | * |
|
| 1149 | */ |
|
| 1150 | public function getDecoratedConnection() |
|
| 1151 | { |
|
| 1152 | $options = $this->getOptions(); |
|
| 1153 | $options = [ |
|
| 1154 | 'username' => $options['user'], |
|
| 1155 | 'password' => $options['pass'], |
|
| 1156 | 'database' => $options['name'], |
|
| 1157 | 'quoteIdentifiers' => true, |
|
| 1158 | ] + $options; |
|
| 1159 | ||
| 1160 | $driver = new SqlServerDriver($options); |
|
| 1161 | ||
| 1162 | if (method_exists($driver, 'setConnection')) { |
|
| 1163 | $driver->setConnection($this->connection); |
|
| 1164 | } else { |
|
| 1165 | $driver->connection($this->connection); |
|
| 1166 | } |
|
| 1167 | ||
| 1168 | return new Connection(['driver' => $driver] + $options); |
|
| 1169 | } |
|
| 1170 | } |
|
| 1171 | ||