summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-02-15 13:37:14 +0100
committerAndrey Andreev <narf@devilix.net>2016-02-15 13:40:20 +0100
commit44d3b185ae7a15e50bd595440187c6c863a13415 (patch)
tree54592475bd72eab9d9036dc9cab511a45b0d8ef9 /system/core
parent8215e2fcf828964b232e9f48befac4f08fa11187 (diff)
Merge pull request #4453 from EpicKris/feature/Autoload-Driver-Object-Name
Autoload Driver Object Names
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Loader.php16
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