Add autoloading library aliasing support (supersedes PR #2824)
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 7817258..8c8d5a3 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -184,9 +184,16 @@
}
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;