From c55b4c5b7b46b6fdc8567fa858237b30b517ff15 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 17 Jun 2011 11:42:24 -0700 Subject: [PATCH] Improve comments in Route\Parser. --- system/route/parser.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/system/route/parser.php b/system/route/parser.php index 416d301e..2ed73559 100644 --- a/system/route/parser.php +++ b/system/route/parser.php @@ -11,25 +11,14 @@ class Parser { */ public static function parameters($uri, $route) { - // -------------------------------------------------------------- - // Split the request URI into segments. - // -------------------------------------------------------------- - $uri_segments = explode('/', $uri); + $parameters = array(); - // -------------------------------------------------------------- - // Split the route URI into segments. - // -------------------------------------------------------------- + $uri_segments = explode('/', $uri); $route_segments = explode('/', $route); // -------------------------------------------------------------- - // Initialize the array of parameters. - // -------------------------------------------------------------- - $parameters = array(); - - // -------------------------------------------------------------- - // Extract all of the parameters out of the URI. - // - // Any segment wrapped in parentheses is considered a parameter. + // Extract all of the parameters out of the URI. Any route + // segment wrapped in parentheses is considered a parameter. // -------------------------------------------------------------- for ($i = 0; $i < count($route_segments); $i++) {