Browse Source

fixed namespace

develop
Robin Thoni 8 years ago
parent
commit
6e76703a42

+ 2
- 2
src/Utils/Controller/LuRoute.php View File

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

+ 1
- 1
src/Utils/Middleware/LuAbstractMiddleware.php View File

6
  * Time: 2:58 PM
6
  * Time: 2:58 PM
7
  */
7
  */
8
 
8
 
9
-namespace Luticate\Utils;
9
+namespace Luticate\Utils\Middleware;
10
 
10
 
11
 use Luticate\Utils\Dbo\LuRouteDbo;
11
 use Luticate\Utils\Dbo\LuRouteDbo;
12
 
12
 

Loading…
Cancel
Save