回答編集履歴

1

コピペするところ間違えました

2020/05/22 15:17

投稿

rururu3
rururu3

スコア5545

test CHANGED
@@ -4,29 +4,29 @@
4
4
 
5
5
  ```php
6
6
 
7
- switch ($config['driver']) {
7
+ switch ($driver) {
8
8
 
9
9
  case 'mysql':
10
10
 
11
- return new MySqlConnector;
11
+ return new MySqlConnection($connection, $database, $prefix, $config);
12
12
 
13
13
  case 'pgsql':
14
14
 
15
- return new PostgresConnector;
15
+ return new PostgresConnection($connection, $database, $prefix, $config);
16
16
 
17
17
  case 'sqlite':
18
18
 
19
- return new SQLiteConnector;
19
+ return new SQLiteConnection($connection, $database, $prefix, $config);
20
20
 
21
21
  case 'sqlsrv':
22
22
 
23
- return new SqlServerConnector;
23
+ return new SqlServerConnection($connection, $database, $prefix, $config);
24
24
 
25
25
  }
26
26
 
27
27
 
28
28
 
29
- throw new InvalidArgumentException("Unsupported driver [{$config['driver']}]");
29
+ throw new InvalidArgumentException("Unsupported driver [{$driver}]");
30
30
 
31
31
  ```
32
32