Added comment to Router class.

This commit is contained in:
Taylor Otwell 2011-07-07 09:37:14 -07:00
parent f0b02caaec
commit 7a8e04cbdd
1 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,9 @@ public static function route($method, $uri)
if (preg_match('#^'.$key.'$#', $method.' '.$uri)) if (preg_match('#^'.$key.'$#', $method.' '.$uri))
{ {
// Remove the leading slashes from the route and request URIs. Also trim
// the request method off of the route URI. This should get the request
// and route URIs in the same format so we can extract the parameters.
$uri = trim($uri, '/'); $uri = trim($uri, '/');
$key = trim(substr($key, strlen($method.' ')), '/'); $key = trim(substr($key, strlen($method.' ')), '/');