Builds url from current url elements.

@return $this
971148
private function rebuildUrl()
    {
        $url = self::buildUrl([
                'scheme' => $this->scheme,
                'host'   => $this->host,
                'port'   => $this->port,
                'path'   => $this->path,
                'query'  => $this->query
            ]
        );
        $this->val($url->val());
        return $this;
    }
362377
protected function createComponentPageUrlModal() : object
    {
        $control = $this->IPage_UrlModal->create();

        $control->onSaveFail[] = function () use ($control)
        {
            $control->redrawControl('urlForm');
        };

        return $control;
    }
563420
public function build()
    {
        $html = '<a href="' . $this->url . '"';

        if ($this->ajax) {
            $html .= ' data-ajax';
        }

        $html .= '>' . $this->text;

        if ($this->current) {
            $html .= ' <span class="sr-only">(current)</span>';
        }

        $html .= '</a>';

        return $html;
    }
665133
protected function paginationUrl()
	{
		// if we have one, don't bother
		if ( ! empty($this->paginationUrl))
		{
			return;
		}

		// do we have any GET variables?
		$get = $this->input->getQuery();

		// do we need to set one
		if ( ! empty($this->config['getVariable']))
		{
			// don't use curly braces here, http_build_query will encode them
			$get[$this->config['getVariable']] = '___PAGE___';
		}

		// do we need to create a segment?
		if ( ! empty($this->config['uriSegment']))
		{
			$segments = explode('/', trim($this->input->getPathInfo(),'/'));
			$segments[$this->config['uriSegment']] = '{page}';

			// construct the Uri
			$this->paginationUrl = '/'.implode('/', $segments);
		}
		else
		{
			// start with the current Uri
			$this->paginationUrl = $this->input->getPathInfo();
		}

		// attach the extension if needed
		$this->paginationUrl .= $this->input->getExtension();

		// any get variables?
		if ( ! empty($get))
		{
			$this->paginationUrl .= '?'.str_replace('___PAGE___', '{page}', http_build_query($get->getContents()));
		}
	}
480654
public function getNextUrl() {
        $urls = $this->_readUrlQueue();
        $nextUrl = array_shift($urls);
        $this->_writeUrlQueue($urls);
        return $nextUrl;
    }
719260
public function updateUrl()
    {
        // if slug is url
        if (is_slug_url($this->slug)) {
            $this->url = $this->slug;

            return $this;
        }

        $this->url = '';
        $this->generateCompleteUrl($this);
        $this->url = $this->url;

        if (strlen($this->slug) == 1) {
            $this->url = $this->slug;
        }
        else if (strlen($this->slug) > 1) {
            $this->url .= (is_slug_url($this->slug) ? "" : "/") . $this->slug;
        }

        return $this;
    }
55134
public function setUrl($url): self
    {
        if (\is_string($url)) {
            $this->options['url'] = $url;

            return $this;
        }

        if ($url instanceof Leg) {
            $this->setUrlFromLeg($url);

            return $this;
        }

        if ($url instanceof BoardData) {
            $this->setUrlFromBoardData($url);

            return $this;
        }

        throw new \InvalidArgumentException(
            sprintf('setUrl must be a string, Leg or BoardData object')
        );
    }
729086
protected function _getCurrentUrl() {
        $url = $this->view->fullUrl($this->view->url());
        $quesPos = strpos($url, '?');
        if ($quesPos !== false) {
            $url = substr($url, 0, $quesPos);
        }
        return $url;
    }
618855
public function permalink()
    {
        foreach($this->data as $post)
        {
            $post->permalink = get_permalink($post->ID);
        }

        return $this;
    }
240998
public static function currentPageURL()
    {
        $pageURL = 'http';
        if ($_SERVER["HTTPS"] == "on") {
            $pageURL .= "s";
        }
        $pageURL .= "://";
        if ($_SERVER["SERVER_PORT"] != "80") {
            $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        } else {
            $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
        }
        $pageURL = str_replace('?live', '?', $pageURL);
        $pageURL = str_replace('&live', '', $pageURL);

        return $pageURL;
    }
711839
protected function buildUrl(array $segments = [])
    {
        //Get the base URL and add a ?
        $url = $this->apiBase.'?';

        if (isset($this->apiEnding)) {
            $segments = array_merge($segments, $this->apiEnding);
        }

        foreach ($segments as $key => $value) {
            $url = $url."$key=$value&";
        }

        //Remove the final &
        $url = substr($url, 0, -1);

        return $url;
    }
1159325
public function url( string$url ):self
	{
		$url= parse_url($url);

		if( !is_array($url) )
			throw new \Exception("Url '$url' is invalid.");

		foreach( $url as $key=>$value )
		{
			$this->$key= $value;
		}

		return $this;
	}
1040982
public function link($url)
    {
        $this->element = 'a';
        if (is_string($url)) {
            $this->setAttr('href', $url);

            return $this;
        }
        $this->setAttr('href', $this->url($url));

        return $this;
    }
658438
private function build() {

        //Get value
        $selected = null;

        if(true === $this -> filled) {

            if(true === isset($this -> attributes['name'])) {

                if(true === Request :: isPost()) {
                    $selected = Request :: fromPost($this -> attributes['name']);
                }
            }
        }

        //Build select
        $html = '<select';
        
        foreach($this -> attributes as $attribute => $value) {

            if('value' !== $attribute) {
                $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
            }
        }

        $html .= '>';

        //Build options
        foreach($this -> options as $key => $value) {

            if(true === is_array($value)) {

                $html .= '<optgroup label="'. Escape :: attr($key) .'">';

                    foreach($value as $key => $value) {

                        $html .= '<option value="'. Escape :: attr($key) .'"';

                            if($key === $selected) {
                                $html .= ' selected="selected"';
                            }

                        $html .= '>'. Escape :: html($value) .'</option>';
                    }

                $html .= '</optgroup>';
            }
            else {

                $html .= '<option value="'. Escape :: attr($key) .'"';

                    if($key === $selected) {
                        $html .= ' selected="selected"';
                    }

                $html .= '>'. Escape :: html($value) .'</option>';
            }
        }
        
        $html .= '</select>';

        return $html;
    }
1339469
public function build()
    {
        $pageFinder = new PageFinder($this->browser);

        if ($this->isWithAssertions) {
            $pageFinder = new PageFinderWithAssertions($pageFinder);
        }

        if ($this->isWithWaits) {
            $pageFinder = new PageFinderWithWaits($pageFinder, $this->timeOutInSeconds);
        }

        return $pageFinder;
    }
1235776
public function url($url)
    {
        if (parse_url($url, PHP_URL_SCHEME) == '') {
            $url = wei()->request->getUrlFor($url);
        }

        $this->request['url'] = $url;

        return $this;
    }
305774
public function getURLWithParams()
    {
        return ($this->params ? sprintf('%s?%s', $this->url, http_build_query($this->params)) : $this->url);
    }