From fb8eb874c0e51bdf9e22b74e8113435689204fe7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Jul 2011 22:59:54 -0500 Subject: [PATCH] added comment regarding nested route directories. --- system/router.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/router.php b/system/router.php index 5cacf1ca..236950bd 100644 --- a/system/router.php +++ b/system/router.php @@ -73,6 +73,9 @@ private static function load_from_directory($uri) { $segments = explode('/', $uri); + // Route files can be nested deep within sub-directories. To find the + // appropriate file, we work our way backward through the URI looking + // for the deepest matching file. foreach (array_reverse($segments, true) as $key => $value) { if (file_exists($path = APP_PATH.'routes/'.implode('/', array_slice($segments, 0, $key + 1)).EXT))