summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-17 14:38:30 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-17 14:38:30 +0100
commit88cf55bd294e74c71e70406e3a48e722db224f7f (patch)
treea030733fc092d2cb45ebcf20d50c6830d28a8aae /system
parenta9938a09e8214b778b8ab11f60501661bb2ac623 (diff)
Add autoloading library aliasing support (supersedes PR #2824)
Diffstat (limited to 'system')
-rw-r--r--system/core/Loader.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 78172580d..8c8d5a37c 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -184,9 +184,16 @@ class CI_Loader {
}
elseif (is_array($library))
{
- foreach ($library as $class)
+ foreach ($library as $key => $value)
{
- $this->library($class, $params);
+ if (is_int($key))
+ {
+ $this->library($value, $params);
+ }
+ else
+ {
+ $this->library($key, $params, $value);
+ }
}
return $this;