public function resolve(array $routeValues)
{
$cachedResolvedUriPath = $this->routerCachingService->getCachedResolvedUriPath($routeValues);
if ($cachedResolvedUriPath !== false) {
return $cachedResolvedUriPath;
}
$this->lastResolvedRoute = null;
$this->createRoutesFromConfiguration();
/** @var $route Route */
foreach ($this->routes as $route) {
if ($route->resolves($routeValues)) {
$this->lastResolvedRoute = $route;
$resolvedUriPath = $route->getResolvedUriPath();
if ($resolvedUriPath !== null) {
$this->routerCachingService->storeResolvedUriPath($resolvedUriPath, $routeValues);
}
return $resolvedUriPath;
}
}
$this->systemLogger->log('Router resolve(): Could not resolve a route for building an URI for the given route values.', LOG_WARNING, $routeValues);
throw new NoMatchingRouteException('Could not resolve a route and its corresponding URI for the given parameters. This may be due to referring to a not existing package / controller / action while building a link or URI. Refer to log and check the backtrace for more details.', 1301610453);
}