Skip to content

Commit 099ed3a

Browse files
committed
TODOs for Router/Dispatcher.
1 parent 92d8b00 commit 099ed3a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Darya/Routing/Dispatcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
/**
1010
* Darya's dispatcher. Invokes the most suitable controller and action derived
11-
* from a route matched by the given router.
11+
* from a route matched by the given router.
12+
*
13+
* TODO: Find a way to merge this into the Router, possibly.
1214
*
1315
* @author Chris Andrew <[email protected]>
1416
*/

src/Darya/Routing/Router.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
/**
1010
* Darya's request router.
1111
*
12+
* TODO: Optionally make use of a service container to replace
13+
* call_user_func_array calls and make Dispatcher redundant.
14+
*
1215
* @author Chris Andrew <chris.andrew>
1316
*/
1417
class Router {
@@ -302,7 +305,7 @@ public function match($request, $callback = null) {
302305
// Clone the route object so as not to modify the instances belonging to the router
303306
$route = clone $route;
304307

305-
// Process the route pattern into a regular expression
308+
// Prepare the route pattern as a regular expression
306309
$pattern = static::preparePattern($route->pattern);
307310

308311
// Test for a match

0 commit comments

Comments
 (0)