Changeset 1772 for trunk/system/libraries/Database.php
- Timestamp:
- 01/21/2008 10:33:19 AM (12 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Database.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Database.php
r1719 r1772 155 155 { 156 156 // Set driver name 157 $driver = 'Database_'.ucfirst( $this->config['connection']['type']).'_Driver';158 159 // Manually call auto-loading, for proper exception handling157 $driver = 'Database_'.ucfirst(strtolower($this->config['connection']['type'])).'_Driver'; 158 159 // Manually autoload so that exceptions can be caught 160 160 Kohana::auto_load($driver); 161 162 // Initialize the driver163 $this->driver = new $driver($this->config);164 161 } 165 162 catch (Kohana_Exception $e) … … 167 164 throw new Kohana_Database_Exception('database.driver_not_supported', $this->config['connection']['type']); 168 165 } 166 167 // Initialize the driver 168 $this->driver = new $driver($this->config); 169 169 170 170 // Validate the driver
