diff options
author | admin <devnull@localhost> | 2006-09-06 04:32:55 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-06 04:32:55 +0200 |
commit | 2e5872ac0527c342e066bdc2e8facf452858dd39 (patch) | |
tree | 25def03c83dc5ceeda27ddbd0c12b7c78449dde0 /system | |
parent | 4d07c1528873d70efcb6fbf305a8ab930a9bc758 (diff) |
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Loader.php | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index e2467fa64..a140fb5a2 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -565,15 +565,7 @@ class CI_Loader { { if (isset($autoload[$type])) { - if ( ! is_array($autoload[$type])) - { - $autoload[$type] = array($autoload[$type]); - } - - foreach ($autoload[$type] as $item) - { - $this->$type($item); - } + $this->$type($autoload[$type]); } } } @@ -592,20 +584,9 @@ class CI_Loader { */ function _ci_object_to_array($object) { - if ( ! is_object($object)) - { - return $object; - } - - $array = array(); - foreach (get_object_vars($object) as $key => $val) - { - $array[$key] = $val; - } - - return $array; + return (is_object($object)) ? get_object_vars($object) : $object; } + // END _ci_object_to_array() } -// END Loader Class ?>
\ No newline at end of file |