From 11ac2919f823c1f7e2b332d61085fdd0cf5fffda Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 10:44:44 -0500 Subject: [PATCH] Refactor the auto-loader. --- system/loader.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/loader.php b/system/loader.php index d9bf607b..56c80fb0 100644 --- a/system/loader.php +++ b/system/loader.php @@ -47,7 +47,10 @@ public static function load($class) { $file = strtolower(str_replace('\\', '/', $class)); - if (array_key_exists($class, static::$aliases)) return class_alias(static::$aliases[$class], $class); + if (array_key_exists($class, static::$aliases)) + { + return class_alias(static::$aliases[$class], $class); + } ( ! static::load_from_registered($file)) or static::load_from_module($file); }