Commit 195f7862 authored by Taylor Otwell's avatar Taylor Otwell

fixed a few controller delegation issues.

parent a0454966
...@@ -11,7 +11,7 @@ abstract class Controller { ...@@ -11,7 +11,7 @@ abstract class Controller {
* @param Request $request * @param Request $request
* @return mixed * @return mixed
*/ */
public function before(Request $request) {} public function before($request) {}
/** /**
* Magic Method to handle calls to undefined functions on the controller. * Magic Method to handle calls to undefined functions on the controller.
......
...@@ -126,7 +126,7 @@ class Handler { ...@@ -126,7 +126,7 @@ class Handler {
$controller = $this->resolve($controller); $controller = $this->resolve($controller);
$response = $controller->before($this->request); $response = ($method == 'before' or strncmp($method, '_', 1) === 0) ? new Error('404') : $controller->before($this->request);
return (is_null($response)) ? call_user_func_array(array($controller, $method), $parameters) : $response; return (is_null($response)) ? call_user_func_array(array($controller, $method), $parameters) : $response;
} }
......
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