Sfoglia il codice sorgente

fixed lu route get instance calls

develop
Robin Thoni 8 anni fa
parent
commit
2f5feaa22f
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2
    2
      src/Utils/Controller/LuRoute.php

+ 2
- 2
src/Utils/Controller/LuRoute.php Vedi 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…
Annulla
Salva