commit | 5a519db2c4884a3972dd33e09d0b3a314aa222e2 | [log] [tgz] |
---|---|---|
author | Andrey Andreev <narf@bofh.bg> | Sat Jan 12 04:19:19 2013 +0200 |
committer | Andrey Andreev <narf@bofh.bg> | Sat Jan 12 04:19:19 2013 +0200 |
tree | e693c7dfcfb0201df17a5c0df4161253bb2ad07d | |
parent | 78fa58a66f4e0d31043f0d3d8a64088fb8900361 [diff] [blame] |
Implement autoload model aliasing (#2117)
diff --git a/system/core/Loader.php b/system/core/Loader.php index 9bfddc1..4d95d62 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php
@@ -233,9 +233,9 @@ } elseif (is_array($model)) { - foreach ($model as $class) + foreach ($model as $key => $value) { - $this->model($class); + $this->model(is_int($key) ? $value : $key, $value); } return; }