Created
August 13, 2014 04:37
-
-
Save mateusz/24398a6c95f6ac028ced to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --cc model/DB.php | |
index 985a420,5f215a6..0000000 | |
--- a/model/DB.php | |
+++ b/model/DB.php | |
@@@ -233,13 -171,9 +233,19 @@@ class DB | |
self::$connection_attempted = true; | |
$dbClass = $databaseConfig['type']; | |
++<<<<<<< HEAD | |
++||||||| merged common ancestors | |
++ $conn = new $dbClass($databaseConfig); | |
++======= | |
+ $conn = Injector::inst()->create($dbClass, $databaseConfig); | |
++>>>>>>> origin/3.1 | |
- self::setConn($conn, $label); | |
+ // Using Injector->get allows us to use registered configurations | |
+ // which may or may not map to explicit objects | |
+ $conn = Injector::inst()->get($dbClass); | |
+ $conn->connect($databaseConfig); | |
+ | |
+ self::set_conn($conn, $label); | |
return $conn; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$conn = Injector::inst()->create($dbClass);
$conn->connect($databaseConfig);