diff options
author | dchill42 <dchill42@gmail.com> | 2012-11-25 00:41:13 +0100 |
---|---|---|
committer | dchill42 <dchill42@gmail.com> | 2012-11-25 07:30:24 +0100 |
commit | 6262d053db57957c4445ef7fce76070854c3e30d (patch) | |
tree | a57f2693abeeedc91d0f7a539ae55028eff4c541 /system/core | |
parent | ad5f1d032fb3204bc1b81891a3231ae8ac47392b (diff) |
Added support for extending individual driver classes and driver unit tests
Signed-off-by: dchill42 <dchill42@gmail.com>
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Loader.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php index 1e6eafe8a..651507470 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -669,6 +669,12 @@ class CI_Loader { return FALSE; } + if ( ! class_exists('CI_Driver_Library')) + { + // We aren't instantiating an object here, just making the base class available + require BASEPATH.'libraries/Driver.php'; + } + // We can save the loader some time since Drivers will *always* be in a subfolder, // and typically identically named to the library if ( ! strpos($library, '/')) @@ -949,13 +955,6 @@ class CI_Loader { // Get the filename from the path $class = substr($class, $last_slash); - - // Check for match and driver base class - if (strtolower(trim($subdir, '/')) == strtolower($class) && ! class_exists('CI_Driver_Library')) - { - // We aren't instantiating an object here, just making the base class available - require BASEPATH.'libraries/Driver.php'; - } } // We'll test for both lowercase and capitalized versions of the file name |