public function __construct(RouterInterface $router, array $routes, $namespace = null) { $this->router = $router; $this->routes = $routes; if ($namespace) { $this->namespace = $namespace; } }