Nette\Routing\RouteList::constructUrl PHP Метод

constructUrl() публичный Метод

Constructs absolute URL from Request object.
public constructUrl ( array $params, Url $refUrl ) : string | null
$params array
$refUrl Nette\Http\Url
Результат string | null
    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;
    }