working on routing architecture.

This commit is contained in:
Taylor Otwell
2011-07-31 21:51:55 -05:00
parent 344f49e1bf
commit 0af326b636
6 changed files with 59 additions and 22 deletions

View File

@@ -51,6 +51,10 @@ class Route {
{
$response = null;
// The callback may be in array form, meaning it has attached filters or is named.
// However, the callback may also simply be a closure. If it is just a closure,
// we can execute it here. Otherwise, we will need to evaluate the route for any
// filters that need to be called.
if (is_callable($this->callback))
{
$response = call_user_func_array($this->callback, $this->parameters);