Browse Source

fixed lu route get instance calls

develop
Robin Thoni 8 years ago
parent
commit
2f5feaa22f
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/Utils/Controller/LuRoute.php

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

@@ -55,11 +55,11 @@ class LuRoute {
55 55
     public function setup()
56 56
     {
57 57
         $routeCollector = new RouteCollector(new Std(), new DataGeneratorGroupCountBased());
58
+        $router = $this;
58 59
 
59 60
         foreach ($this->getRoutes() as $route) {
60
-            $routeCollector->addRoute($route->getMethod(), $route->getUrl(), function($parameters) use($route)
61
+            $routeCollector->addRoute($route->getMethod(), $route->getUrl(), function($parameters) use($route, $router)
61 62
             {
62
-                $router = static::getInstance();
63 63
                 return $router->execute($route, $parameters);
64 64
             });
65 65
         }

Loading…
Cancel
Save