diff --git a/system/router.php b/system/router.php index 51c1e790..64944545 100644 --- a/system/router.php +++ b/system/router.php @@ -78,6 +78,9 @@ public static function route($method, $uri) */ public static function find($name) { + // -------------------------------------------------------------- + // Have we already located this route by name? + // -------------------------------------------------------------- if (array_key_exists($name, static::$names)) { return static::$names[$name]; @@ -86,6 +89,9 @@ public static function find($name) $arrayIterator = new \RecursiveArrayIterator(static::$routes); $recursiveIterator = new \RecursiveIteratorIterator($arrayIterator); + // -------------------------------------------------------------- + // Find the named route. + // -------------------------------------------------------------- foreach ($recursiveIterator as $iterator) { $route = $recursiveIterator->getSubIterator();