Explorar el Código

fixed lu route get instance calls

develop
Robin Thoni hace 8 años
padre
commit
2f5feaa22f
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      src/Utils/Controller/LuRoute.php

+ 2
- 2
src/Utils/Controller/LuRoute.php Ver fichero

@@ -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…
Cancelar
Guardar