Changeset 1773
- Timestamp:
- 01/21/2008 10:56:43 AM (12 months ago)
- Location:
- trunk/system
- Files:
-
- 7 modified
-
core/Kohana.php (modified) (1 diff)
-
libraries/Archive.php (modified) (2 diffs)
-
libraries/Cache.php (modified) (2 diffs)
-
libraries/Database.php (modified) (2 diffs)
-
libraries/Image.php (modified) (2 diffs)
-
libraries/Payment.php (modified) (1 diff)
-
libraries/Session.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/core/Kohana.php
r1772 r1773 597 597 598 598 // If the file doesn't exist, just return 599 if (($filepath = self::find_file($type, $file , TRUE)) === FALSE)599 if (($filepath = self::find_file($type, $file)) === FALSE) 600 600 return; 601 601 -
trunk/system/libraries/Archive.php
r1772 r1773 34 34 $driver = 'Archive_'.ucfirst(strtolower($type)).'_Driver'; 35 35 36 // Manually autoload so that exceptions can be caught37 Kohana::auto_load($driver);36 // Manually load so that exceptions can be caught 37 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 38 38 } 39 39 catch (Kohana_Exception $exception) … … 46 46 47 47 // Validate the driver 48 if ( ! in_array('Archive_Driver', class_implements($this->driver)))48 if ( ! (self::$driver instanceof Archive_Driver)) 49 49 throw new Kohana_Exception('archive.driver_implements', $type); 50 50 -
trunk/system/libraries/Cache.php
r1772 r1773 39 39 $driver = 'Cache_'.ucfirst(strtolower($this->config['driver'])).'_Driver'; 40 40 41 // Manually autoload so that exceptions can be caught42 Kohana::auto_load($driver);41 // Manually load so that exceptions can be caught 42 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 43 43 } 44 44 catch (Kohana_Exception $e) … … 51 51 52 52 // Validate the driver 53 if ( ! in_array('Cache_Driver', class_implements($this->driver)))53 if ( ! (self::$driver instanceof Cache_Driver)) 54 54 throw new Kohana_Exception('cache.driver_not_supported', 'Cache drivers must use the Cache_Driver interface.'); 55 55 -
trunk/system/libraries/Database.php
r1772 r1773 157 157 $driver = 'Database_'.ucfirst(strtolower($this->config['connection']['type'])).'_Driver'; 158 158 159 // Manually autoload so that exceptions can be caught160 Kohana::auto_load($driver);159 // Manually load so that exceptions can be caught 160 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 161 161 } 162 162 catch (Kohana_Exception $e) … … 169 169 170 170 // Validate the driver 171 if ( ! ( $this->driver instanceof Database_Driver))171 if ( ! (self::$driver instanceof Database_Driver)) 172 172 throw new Kohana_Exception('database.driver_not_supported', 'Database drivers must use the Database_Driver interface.'); 173 173 -
trunk/system/libraries/Image.php
r1772 r1773 69 69 $driver = 'Image_'.ucfirst(strtolower($this->config['driver'])).'_Driver'; 70 70 71 // Manually autoload so that exceptions can be caught72 Kohana::auto_load($driver);71 // Manually load so that exceptions can be caught 72 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 73 73 } 74 74 catch (Kohana_Exception $e) … … 80 80 $this->driver = new $driver($this->config['params']); 81 81 82 if ( ! ( $this->driver instanceof Image_Driver))82 if ( ! (self::$driver instanceof Image_Driver)) 83 83 throw new Kohana_Exception('image.invalid_driver', $driver); 84 84 } -
trunk/system/libraries/Payment.php
r1772 r1773 83 83 $driver = 'Payment_'.ucfirst(strtolower($this->config['driver'])).'_Driver'; 84 84 85 // Manually autoload so that exceptions can be caught86 Kohana::auto_load($driver);85 // Manually load so that exceptions can be caught 86 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 87 87 } 88 88 catch (Kohana_Exception $e) -
trunk/system/libraries/Session.php
r1772 r1773 61 61 $driver = 'Session_'.ucfirst(strtolower(self::$config['driver'])).'_Driver'; 62 62 63 // Manually autoload so that exceptions can be caught64 Kohana::auto_load($driver);63 // Manually load so that exceptions can be caught 64 require_once Kohana::find_file('libraries/drivers', substr($driver, 0, -7), TRUE); 65 65 } 66 66 catch (Kohana_Exception $e) … … 73 73 74 74 // Validate the driver 75 if ( ! in_array('Session_Driver', class_implements(self::$driver)))75 if ( ! (self::$driver instanceof Session_Driver)) 76 76 throw new Kohana_Exception('session.driver_must_implement_interface'); 77 77 }
