Commit 9cabf545 by Taylor Otwell

Refactor the route class.

parent d1d4ac10
...@@ -63,7 +63,7 @@ class Route { ...@@ -63,7 +63,7 @@ class Route {
{ {
$response = isset($this->callback['before']) ? Filter::call($this->callback['before'], array(), true) : null; $response = isset($this->callback['before']) ? Filter::call($this->callback['before'], array(), true) : null;
if (is_null($response) and ! is_null($handler = $this->handler())) if (is_null($response) and ! is_null($handler = $this->find_route_function()))
{ {
$response = call_user_func_array($handler, $this->parameters); $response = call_user_func_array($handler, $this->parameters);
} }
...@@ -87,7 +87,7 @@ class Route { ...@@ -87,7 +87,7 @@ class Route {
* *
* @return Closure * @return Closure
*/ */
private function handler() private function find_route_function()
{ {
if (isset($this->callback['do'])) return $this->callback['do']; if (isset($this->callback['do'])) return $this->callback['do'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment