Skip to content

Commit

Permalink
Instead of parsing out the DSN for the class we should load, specify …
Browse files Browse the repository at this point in the history
…it in the DB's config array. This lets us break out DB types that aren't directly recognizable from the DSN.
  • Loading branch information
chrismeller committed Jul 25, 2011
1 parent bac2c88 commit 00aa321
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions classes/db.php
Expand Up @@ -36,9 +36,7 @@ public static function factory ( $environment = null, $config = null ) {
$config = Kohana::config( 'db' )->$environment;
}

list($engine) = explode(':', $config['dsn'], 2);

$class = 'DB_Connection_' . $engine;
$class = 'DB_Connection_' . $config['type'];

// create the instance
$instance = new $class( $environment, $config );
Expand Down

0 comments on commit 00aa321

Please sign in to comment.