質問編集履歴

1

ミス

2018/03/20 08:41

投稿

n_oshiumi
n_oshiumi

スコア16

test CHANGED
File without changes
test CHANGED
@@ -176,30 +176,30 @@
176
176
 
177
177
  // Make a connection
178
178
 
179
+ $di->set(
180
+
181
+ "db",
182
+
183
+ function () {
184
+
179
- $connection = new Mysql(
185
+ return new DbAdapter(
180
-
186
+
181
- [
187
+ [
182
-
188
+
183
- "host" => "localhost",
189
+ "host" => "localhost",
184
-
190
+
185
- "username" => "root",
191
+ "username" => "root",
186
-
192
+
187
- "password" => "password", //今だけ変えています
193
+ "password" => "secret", //今だけ変えています
188
-
194
+
189
- "dbname" => "phalcon_test",
195
+ "dbname" => "phalcon_test",
190
-
191
- "port" => 3306,
196
+
192
-
193
- ]
197
+ ]
194
-
198
+
195
- );
199
+ );
196
-
197
-
198
-
200
+
199
- // Reconnect
201
+ }
200
-
202
+
201
- $connection->connect();
203
+ );
202
-
203
-
204
204
 
205
205
  ```