context = $context; $this->staticRoutes = [ '/rootprefix/test' => [[['_route' => 'static'], null, null, null, false, false, null]], '/with-condition' => [[['_route' => 'with-condition'], null, null, null, false, false, -1]], ]; $this->regexpList = [ 0 => '{^(?' .'|/rootprefix/([^/]++)(*:27)' .')/?$}sD', ]; $this->dynamicRoutes = [ 27 => [[['_route' => 'dynamic'], ['var'], null, null, false, true, null]], ]; $this->checkCondition = static function ($condition, $context, $request) { switch ($condition) { case -1: return ($context->getMethod() == "GET"); } }; } }