Code cleanup.
This commit is contained in:
parent
5af80d8b1d
commit
4c0434399a
|
|
@ -71,9 +71,6 @@ class Route {
|
||||||
|
|
||||||
$pattern = '';
|
$pattern = '';
|
||||||
|
|
||||||
// REGEX for idenifying Level 1 URI Templates, like /foo/{bar}
|
|
||||||
$expressionPattern = '/{([a-zA-Z]+)}/';
|
|
||||||
|
|
||||||
// Explode the template into an array of path segments.
|
// Explode the template into an array of path segments.
|
||||||
if ($uriTemplate[0] === '/') {
|
if ($uriTemplate[0] === '/') {
|
||||||
$parts = explode('/', substr($uriTemplate, 1));
|
$parts = explode('/', substr($uriTemplate, 1));
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ class Router {
|
||||||
require_once($route->handlerPath);
|
require_once($route->handlerPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Need to rethink this plan. May not have a $request yet.
|
||||||
return $handler = new $klass($request, $matches);
|
return $handler = new $klass($request, $matches);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue