From 9929d6f77a0e54288b1696343439b0e91b21866e Mon Sep 17 00:00:00 2001 From: Christopher Guiney Date: Fri, 9 Mar 2012 19:53:24 -0800 Subject: Allow drivers to be loaded as an array, like models and libraries. --- system/core/Loader.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'system/core') diff --git a/system/core/Loader.php b/system/core/Loader.php index 3d91915c4..42d8162bb 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -615,13 +615,22 @@ class CI_Loader { * * Loads a driver library * - * @param string the name of the class + * @param mixed the name of the class or array of classes * @param mixed the optional parameters * @param string an optional object name * @return void */ public function driver($library = '', $params = NULL, $object_name = NULL) { + if(is_array($library)) + { + foreach ( $library as $driver ) + { + $this->driver($driver); + } + return FALSE; + } + if ( ! class_exists('CI_Driver_Library')) { // we aren't instantiating an object here, that'll be done by the Library itself -- cgit v1.2.3-24-g4f1b