Improve comments in Route\Parser.
This commit is contained in:
parent
253e529c41
commit
c55b4c5b7b
|
@ -11,25 +11,14 @@ class Parser {
|
||||||
*/
|
*/
|
||||||
public static function parameters($uri, $route)
|
public static function parameters($uri, $route)
|
||||||
{
|
{
|
||||||
// --------------------------------------------------------------
|
$parameters = array();
|
||||||
// Split the request URI into segments.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
$uri_segments = explode('/', $uri);
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
$uri_segments = explode('/', $uri);
|
||||||
// Split the route URI into segments.
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
$route_segments = explode('/', $route);
|
$route_segments = explode('/', $route);
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Initialize the array of parameters.
|
// Extract all of the parameters out of the URI. Any route
|
||||||
// --------------------------------------------------------------
|
// segment wrapped in parentheses is considered a parameter.
|
||||||
$parameters = array();
|
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
// Extract all of the parameters out of the URI.
|
|
||||||
//
|
|
||||||
// Any segment wrapped in parentheses is considered a parameter.
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
for ($i = 0; $i < count($route_segments); $i++)
|
for ($i = 0; $i < count($route_segments); $i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue