|
@@ -75,7 +75,7 @@ class LuRoute {
|
75
|
75
|
* @var $middleware LuAbstractMiddleware
|
76
|
76
|
*/
|
77
|
77
|
$middleware = new $middlewareName();
|
78
|
|
- $middleware->onBefore($route, $parameters);
|
|
78
|
+ $parameters = $middleware->onBefore($route, $parameters);
|
79
|
79
|
$middlewares[] = $middleware;
|
80
|
80
|
}
|
81
|
81
|
|
|
@@ -126,7 +126,7 @@ class LuRoute {
|
126
|
126
|
$result = call_user_func_array(array($controllerInstance, $route->getControllerMethod()), $args);
|
127
|
127
|
|
128
|
128
|
foreach ($middlewares as $middleware) {
|
129
|
|
- $middleware->onAfter($route, $parameters, $result);
|
|
129
|
+ $result = $middleware->onAfter($route, $parameters, $result);
|
130
|
130
|
}
|
131
|
131
|
|
132
|
132
|
return $result;
|