From 86fde936acbdda1a9c64c502cbcb0291cabf4c38 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 11:28:17 -0500 Subject: [PATCH] refactor the route loader. --- system/routing/loader.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/system/routing/loader.php b/system/routing/loader.php index a7b2af5a..43414cc2 100644 --- a/system/routing/loader.php +++ b/system/routing/loader.php @@ -86,7 +86,10 @@ public static function all($reload = false, $path = APP_PATH) foreach ($paths as $path) { - if (file_exists($path.'routes'.EXT)) $routes = array_merge($routes, require $path.'routes'.EXT); + if (file_exists($path.'routes'.EXT)) + { + $routes = array_merge($routes, require $path.'routes'.EXT); + } if (is_dir($path.'routes')) { @@ -98,7 +101,10 @@ public static function all($reload = false, $path = APP_PATH) foreach ($recursiveIterator as $file) { - if (filetype($file) === 'file' and strpos($file, EXT) !== false) $routes = array_merge($routes, require $file); + if (filetype($file) === 'file' and strpos($file, EXT) !== false) + { + $routes = array_merge($routes, require $file); + } } } }