diff options
author | Andrey Andreev <narf@devilix.net> | 2016-02-15 13:37:14 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-02-15 13:37:14 +0100 |
commit | a64d2262e37ea9308865f5d81c1b1ccdfaa52721 (patch) | |
tree | 44c46d9f93a712e5b13821dad57e14e9449733ae /system/core/Loader.php | |
parent | 02fde67322db74df42ef8dc953cc2be3f9fc4ccd (diff) | |
parent | 0d181ee540749c3a5dc147b1e280b7515d1b360e (diff) |
Merge pull request #4453 from EpicKris/feature/Autoload-Driver-Object-Name
Autoload Driver Object Names
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r-- | system/core/Loader.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php index 37d1ecaf9..80de804ea 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -718,9 +718,16 @@ class CI_Loader { { if (is_array($library)) { - foreach ($library as $driver) + foreach ($library as $key => $value) { - $this->driver($driver); + if (is_int($key)) + { + $this->driver($value, $params); + } + else + { + $this->driver($key, $params, $value); + } } return $this; @@ -1334,10 +1341,7 @@ class CI_Loader { // Autoload drivers if (isset($autoload['drivers'])) { - foreach ($autoload['drivers'] as $item) - { - $this->driver($item); - } + $this->driver($autoload['drivers']); } // Load libraries |