refactoring for better dependency injection on a few classes.

This commit is contained in:
Taylor Otwell
2011-10-29 22:24:32 -05:00
parent faaea17fd3
commit 932a70b6cf
13 changed files with 248 additions and 105 deletions

View File

@@ -102,12 +102,13 @@ class Router {
/**
* Search the routes for the route matching a request method and URI.
*
* @param string $method
* @param string $uri
* @param Request $request
* @return Route
*/
public function route($method, $uri)
public function route(Request $request)
{
list($method, $uri) = array($request->method(), $request->uri());
$routes = $this->loader->load($uri);
// All route URIs begin with the request method and have a leading