|
@@ -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
|
}
|