tweaking a comment.
This commit is contained in:
parent
f0d3589be4
commit
49901bab31
|
@ -98,8 +98,8 @@ public static function to_route($name, $parameters = array(), $https = false)
|
||||||
{
|
{
|
||||||
$uris = explode(', ', key($route));
|
$uris = explode(', ', key($route));
|
||||||
|
|
||||||
// Grab the first URI assigned to the route, removing the request URI
|
// Grab the first URI assigned to the route and remove the URI and
|
||||||
// and leading slash from the destination defined on the route.
|
// leading slash from the destination that's defined on the route.
|
||||||
$uri = substr($uris[0], strpos($uris[0], '/'));
|
$uri = substr($uris[0], strpos($uris[0], '/'));
|
||||||
|
|
||||||
// Spin through each route parameter and replace the route wildcard
|
// Spin through each route parameter and replace the route wildcard
|
||||||
|
@ -110,8 +110,8 @@ public static function to_route($name, $parameters = array(), $https = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace all remaining optional segments with spaces. Since the
|
// Replace all remaining optional segments with spaces. Since the
|
||||||
// segments are, obviously, optional, some of them may not have
|
// segments are optional, some of them may not have been assigned
|
||||||
// been assigned values from the parameter array.
|
// values from the parameter array.
|
||||||
return static::to(str_replace(array('/(:any?)', '/(:num?)'), '', $uri), $https);
|
return static::to(str_replace(array('/(:any?)', '/(:num?)'), '', $uri), $https);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue