Fixing comments on Router class.
This commit is contained in:
parent
5a67571020
commit
59e5cfc711
|
@ -23,8 +23,7 @@ public static function route($method, $uri)
|
||||||
static::$routes = (is_dir(APP_PATH.'routes')) ? static::load($uri) : require APP_PATH.'routes'.EXT;
|
static::$routes = (is_dir(APP_PATH.'routes')) ? static::load($uri) : require APP_PATH.'routes'.EXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Put the request method and URI in route form. All routes begin with
|
// Put the request method and URI in route form. Routes begin with the request method and a forward slash.
|
||||||
// the request method and a forward slash.
|
|
||||||
$uri = $method.' /'.trim($uri, '/');
|
$uri = $method.' /'.trim($uri, '/');
|
||||||
|
|
||||||
// Is there an exact match for the request?
|
// Is there an exact match for the request?
|
||||||
|
@ -35,8 +34,7 @@ public static function route($method, $uri)
|
||||||
|
|
||||||
foreach (static::$routes as $keys => $callback)
|
foreach (static::$routes as $keys => $callback)
|
||||||
{
|
{
|
||||||
// Only check routes that have multiple URIs or wildcards. All other routes would
|
// Only check routes that have multiple URIs or wildcards. Other routes would be caught by a literal match.
|
||||||
// have been caught by a literal match.
|
|
||||||
if (strpos($keys, '(') !== false or strpos($keys, ',') !== false )
|
if (strpos($keys, '(') !== false or strpos($keys, ',') !== false )
|
||||||
{
|
{
|
||||||
foreach (explode(', ', $keys) as $key)
|
foreach (explode(', ', $keys) as $key)
|
||||||
|
|
Loading…
Reference in New Issue