Returns the URL of the first route.
@return URL backed by the first route.
510537
public Optional<URL> getRoute() {
        Optional<Route> optionalRoute = getClient().routes().inNamespace(namespace)
            .list().getItems()
            .stream()
            .findFirst();

        return optionalRoute
            .map(OpenShiftRouteLocator::createUrlFromRoute);
    }
193153
public function getURL()
    {
        $p = $this->recall('page');

        // If there is a login page, no need to return to it
        if ($p == 'login') {
            return $this->app->url('/');
        }

        $url = $this->app->url($p, $this->recall('args', null));
        $this->forget('page');
        $this->forget('args');

        return $url;
    }
930513
public function getDefaultUrl(): string
    {
        $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('pages');
        $firstPageInTree = $connection->select(['uid'], 'pages', ['pid' => 0], [], ['sorting' => 'ASC'], 1)->fetchColumn(0);
        $url = BackendUtility::getViewDomain($firstPageInTree);

        return $url;
    }
114674
private function getRoute()
    {
        $route = $this->route;
        $first = substr($route, 0, 1);
        $last = substr($route, -1);
        if($first == "/") {
            $route = substr($route, 1);
        }
        if($last == "/") {
            $route = substr($route, 0, -1);
        }
        $this->resource = $route;
        
    }
714940
protected function getRoute()
    {
        $route = $this->path['route'];
        if (is_array($route)) {
            return route($route[0], array_slice($route, 1));
        }

        return route($route);
    }
735309
public function url()
    {
        $args = func_get_args();
        $controller = array_shift($args);

        $url = $this->urlBuilder->createUrl($controller, $args);

        if ($url === false) {
            return $controller;
        } else {
            return $url;
        }
    }
1141355
public UrlPath urlPath() {
        if (null == urlPath) {
            urlPath = UrlPath.of(null == processedUrl ? req().url() : processedUrl);
        }
        return urlPath;
    }
23604
public function url()
    {
        if ($this->{self::ATTR_PRIMARY_URI} === null) {
            return;
        }

        if ($this->primaryUrl === null) {
            $this->primaryUrl = new URL([
                'page'       => $this,
                'location'   => $this->{self::ATTR_PRIMARY_URI},
                'is_primary' => true,
            ]);
        }

        return $this->primaryUrl;
    }
696431
public String getURL()
  {
    int port = getPort();

    return (getScheme() + "://" + getHost() + 
            (port == 80 ? "" : ":" + getPort()) +
            getPath() +
            (_query == null ? "" : "?" + _query));
  }
685318
protected function getReturnURL()
    {
        $url = $this->request->getVar('returnURL');

        // Check that this url is a site url
        if (empty($url) || !Director::is_site_url($url)) {
            return null;
        }

        // Convert to absolute URL
        return Director::absoluteURL($url, true);
    }
455800
public function getUrl()
    {
        if (empty($this->url)) {
            $url = $this->httpRequest()->getCurrentUrl(true)->getPath();
            // we need to have the trailing slash because of the match inside matchRequest
            // and also when matching the default method, we can do an incorrect match if we don't have the start and end slash
            $this->url = $this->str($url)->trimRight('/')->val() . '/';
        }

        return $this->url;
    }
1041357
public function url()
    {
        // If the item has a link proceed:
        if (!is_null($this->link)) {
            // If item's link has `href` property explicitly defined
            // return it
            if ($this->link->href) {
                return $this->link->href;
            }

            // Otherwise dispatch to the proper address
            return $this->builder->dispatch($this->link->path);
        }
    }
200946
public List<URL> getURLs() {
        final List<URL> resourceURLs = new ArrayList<>(this.size());
        for (final Resource resource : this) {
            resourceURLs.add(resource.getURL());
        }
        return resourceURLs;
    }
816033
protected function getCloneUrl()
    {
        $url = $this->getProject()->getReference();

        if (substr($url, -1) != '/') {
            $url .= '/';
        }

        $branch = $this->getBranch();

        if (empty($branch) || $branch == 'trunk') {
            $url .= 'trunk';
        } else {
            $url .= 'branches/' . $branch;
        }

        return $url;
    }
329627
protected function getRedirectUrl()
    {
        $url = $this->redirector->getUrlGenerator();

        if ($this->redirect) {
            return $url->to($this->redirect);
        } elseif ($this->redirectRoute) {
            return $url->route($this->redirectRoute);
        } elseif ($this->redirectAction) {
            return $url->action($this->redirectAction);
        }

        return $url->previous();
    }
883647
public String path() {
    /* build the fully qualified url with all query parameters */
    StringBuilder path = new StringBuilder();
    if (this.target != null) {
      path.append(this.target);
    }
    if (this.uriTemplate != null) {
      path.append(this.uriTemplate.toString());
    }
    if (path.length() == 0) {
      /* no path indicates the root uri */
      path.append("/");
    }
    return path.toString();

  }
279699
public function getUrlPageName()
    {
        if (static::$urlPageName !== null) {
            return static::$urlPageName;
        }

        /*
         * Cache
         */
        $key = 'urlMaker'.$this->urlComponentName.crc32(get_class($this));

        $cached = Cache::get($key, false);
        if ($cached !== false && ($cached = @unserialize($cached)) !== false) {
            $filePath = array_get($cached, 'path');
            $mtime = array_get($cached, 'mtime');
            if (!File::isFile($filePath) || ($mtime != File::lastModified($filePath))) {
                $cached = false;
            }
        }

        if ($cached !== false) {
            return static::$urlPageName = array_get($cached, 'fileName');
        }

        /*
         * Fallback
         */
        $page = null;
        $useProperty = property_exists($this, 'urlComponentProperty');

        if ($useProperty) {
            $page = Page::whereComponent($this->urlComponentName, $this->urlComponentProperty, '1')->first();
        }

        if (!$useProperty || !$page) {
            $page = Page::withComponent($this->urlComponentName)->first();
        }

        if (!$page) {
            throw new ApplicationException(sprintf(
                'Unable to a find a primary component "%s" for generating a URL in %s.',
                $this->urlComponentName,
                get_class($this)
            ));
        }

        $baseFileName = $page->getBaseFileName();
        $filePath = $page->getFilePath();

        $cached = [
            'path'     => $filePath,
            'fileName' => $baseFileName,
            'mtime'    => @File::lastModified($filePath)
        ];

        Cache::put($key, serialize($cached), Config::get('cms.parsedPageCacheTTL', 1440));

        return static::$urlPageName = $baseFileName;
    }