瀏覽代碼

fixed lu route get instance calls

develop
Robin Thoni 8 年之前
父節點
當前提交
2f5feaa22f
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      src/Utils/Controller/LuRoute.php

+ 2
- 2
src/Utils/Controller/LuRoute.php 查看文件

@@ -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…
取消
儲存