public function constructUrl(array $params, Nette\Http\Url $refUrl)
{
if ($this->cachedRoutes === NULL) {
$this->warmupCache();
}
$target = isset($params['presenter']) && isset($this->cachedRoutes[$params['presenter']]) ? $params['presenter'] : '*';
foreach ($this->cachedRoutes[$target] as $route) {
$url = $route->constructUrl($params, $refUrl);
if ($url !== NULL) {
return $url;
}
}
return NULL;
}