diff options
author | Derek Jones <derek.jones@ellislab.com> | 2010-03-05 20:01:44 +0100 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2010-03-05 20:01:44 +0100 |
commit | 8dca04163a79701021043fcd3e267a5d965af993 (patch) | |
tree | faca3e3e1d3ac1f83dba692177ab00c02f060413 /system/core/Loader.php | |
parent | b8354c1e8c85399697af2d8ffd3584095594bba2 (diff) |
added Driver lib
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r-- | system/core/Loader.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php index f70ee0334..c399f296d 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -544,6 +544,29 @@ class CI_Loader { // -------------------------------------------------------------------- /** + * Driver + * + * Loads a driver library + * + * @param string the name of the class + * @param mixed the optional parameters + * @param string an optional object name + * @return void + */ + function driver($library = '', $params = NULL, $object_name = NULL) + { + if ( ! class_exists('CI_Driver_Library')) + { + // we aren't instantiating an object here, that'll be done by the Library itself + require_once BASEPATH.'libraries/Driver'.EXT; + } + + return $this->library($library, $params, $object_name); + } + + // -------------------------------------------------------------------- + + /** * Add Package Path * * Prepends a parent path to the library, model, helper, and config path arrays |