Set base URL.

@param  string  $root

@return $this
343235
public function setBaseUrl($root)
    {
        $baseUrl = str_replace(['https://', 'http://'], '', $root);
        $base    = explode('/', $baseUrl, 2);

        if (count($base) > 1) {
            $this->basePrefix = array_pop($base);
        }


        $this->baseUrl = array_shift($base);

        return $this;
    }
132092
public function setUrl( $url )
    {
        // Only set cell value for single cells
        if (!str_contains( $this->cells, ':' )) {
            $this->sheet->getCell( $this->cells )->getHyperlink()->setUrl( $url );
        }

        return $this;
    }
181756
public function setBaseHost($baseHost = null)
    {
        $this->log->debug('Setting Router baseHost to ' . $baseHost);
        $this->baseHost = $baseHost;
        return $this;
    }
657645
public function setUrl($url)
    {
        // validate url
        if (filter_var($url, FILTER_VALIDATE_URL)) {
            $this->url = $url;
        } else {
            throw new InvalidUrlException('"' . $url . '" is not a valid URL');
        }

        return $this;
    }
1321549
public function setRepository($url)
    {
        if (false !== strpos($url, '@')) {
            list($url, $branch) = explode('@', $url);
            $this->branch = $branch;
        }

        $this->repository = $url;

        return $this;
    }
392285
public function setDatabaseUrl ($url)
    {
        $parts = parse_url($url);

        $this->database['name'] = trim($parts['path'], '/');
        $this->database['user'] = $parts['user'];
        $this->database['pass'] = $parts['pass'];
        $this->database['host'] = $parts['host'];
        $this->database['port'] = $parts['port'];

        return $this;
    }
1037351
public function setUrl($url)
    {
        if (! empty($url)) {
            $segments = parse_url($url);

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

            if ($this->format = pathinfo($this->path, PATHINFO_EXTENSION)) {
                $this->path = str_replace('.'.$this->format, '', $this->path);
            }
        }

        return $this;
    }
673417
public function set_url() {

		$plugins_url = plugins_url();
		$this_url    = trim( substr( trailingslashit( plugin_dir_url( __FILE__ ) ), strlen( $plugins_url ) ), '/' );

		if ( false !== strpos( $this_url, '/' ) ) {
			$url_path = explode( '/', $this_url );
			// generic 3 path depth: classes/namespace/ui|data.
			array_splice( $url_path, count( $url_path ) - 3 );
			$this_url = implode( '/', $url_path );
		}
		// setup the base URL.
		$this->url = trailingslashit( $plugins_url . '/' . $this_url );
	}
433542
protected function setBaseUrl($site): self
    {
        $this->baseUrl = sprintf($this->baseUrl, $site, self::VERSION);

        return $this;
    }
771050
public function setBasePath($path) {
		$path = rtrim($path, '\/');
		
		if (preg_match('~^[a-z]+:~', $path)) {
			$this->basePath = $path;
			$this->isLocal  = false;
			return;
		}
		
		$this->basePath = realpath($path);
		$this->isLocal  = true;
		
		return $this;
	}
925372
public function setSiteRoot($url)
    {
        $url = strval($url);
        if ('' !== $url)
        {
            $url = rtrim(parse_url($url, PHP_URL_PATH), '/');
            if (substr($url, 0, 1) != '/')
            {
                $url = '/' . $url;
            }
        }
        $this->siteRoot = $url;
    }
250007
public function setResource($resource)
    {
        $this->resource = $resource;

        if (null !== $resource) {
            $this->stopPropagation();
        }

        return $this;
    }
326498
public function setUri($uri)
	{
		if (filter_var($uri, FILTER_VALIDATE_URL)) {
			$this->uri = $uri;
		} else {
			throw new RuntimeException('Invalid URI setted.');
		}
		
		return $this;
	}
800081
public function setHost($host)
    {
        if (substr($host, -1) === '/') {
            $host = substr($host, 0, -1);
        }

        $headers = $this->getConfig('headers');
        $headers['Host'] = $host;
        $this->setConfigOption('headers', $headers);

        if (strpos('/', $host) === false) {
            $host = 'https://' . $host;
        }
        $this->setConfigOption('base_uri', $host);

        return $this;
    }
376770
public function withBaseUri(string $uri): self
    {
        return tap($this, function ($request) use ($uri) {
            return $this->options = array_merge_recursive($this->options, [
                'base_uri' => $uri,
            ]);
        });
    }
703463
public function setBaseHref($url)
    {
        $node = $this->filterXPath('descendant-or-self::base')->getNode(0);
        if ($node == null) {
            $node = $this->dom->createElement('base');
            $this->getHeadNode()->appendChild($node);
        }
        $node->setAttribute('href', $url);
    }
456483
public static function setRootPath(string $root)
    {
        $mode = static::mode();
        $path = "{$root}/{$mode}";

        if (! file_exists($path)) {
            throw new InvalidArgumentException("'{$path}' not exists");
        }

        static::$root = realpath($root);
        static::$path = realpath($path);

        unset($mode, $path);
    }