Set the base URL.
@param string $baseUrl The base URL.
348568
public function setBaseUrl($baseUrl)
    {
        if (substr($baseUrl, 0, 2) === '//') {
            $baseUrl = 'http:'.$baseUrl;
            $this->isRelativeDomain = true;
        }

        $this->baseUrl = rtrim($baseUrl, '/');
    }
634006
def set_base_url(url):
    
    global _base_url, _dirty

    LOGGER.debug('Setting base URL to %s', url)
    _base_url = url
    _dirty = True
1264859
public final function setUrl($url)
    {
        if (is_string($url)) {

            $this->_url = new ehough_curly_Url($url);

            return;
        }

        if (! $url instanceof ehough_curly_Url) {

            throw new ehough_shortstop_api_exception_InvalidArgumentException(
                'setUrl() only takes a string or a ehough_curly_Url instance'
            );
        }

        $this->_url = $url;
    }
573293
public function setBasePath( string$basePath ):self
	{
		$this->basePath= '/'===substr($basePath,-1) ? substr($basePath,0,-1) : $basePath;

		return $this;
	}
830182
public function setBasePath(string $path)
    {
        if (Assert::stringNotEmpty($path)) {
            $this->basePath = rtrim($path, '\\/') . $this->separator;
        }
    }
310326
public function baseUrl($url = null)
    {
        if (!is_null($url) && true !== $url) {
            $this->baseUrl = $url;
            return $this;
        } elseif (!$this->baseUrl) {
            $str           = $this->url();
            $this->baseUrl = strpos($str, '?') ? strstr($str, '?', true) : $str;
        }
        return true === $url ? $this->domain() . $this->baseUrl : $this->baseUrl;
    }
1242823
function setBaseUrl(projectBaseUrl) {
        var context = _getProjectViewStateContext();

        projectBaseUrl = model.setBaseUrl(projectBaseUrl);

        PreferencesManager.setViewState("project.baseUrl", projectBaseUrl, context);
    }
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;
    }
931506
protected function set_url($url) {
        if ($url instanceof \moodle_url) {
            $url = $url->out(false);
        }
        $this->raw_set('url', $url);
    }
392583
private function isBaseUrl($url)
    {
        if ($url === static::BASE_URL_IDENTIFIER
            || array_key_exists($url, $this->urlMappings) && $this->baseUrl === $this->urlMappings[$url]
        ) {
            return true;
        }

        return false;
    }
1339880
public function setUrl($url) {
        if (!is_string($url)) throw new IllegalTypeException('Illegal type of parameter $url: '.gettype($url));

        // TODO: validate URL

        if (strpos($url, ' ') !== false)
            throw new InvalidArgumentException('Invalid argument $url: '.$url);

        $this->url = $url;
        return $this;
    }
1192816
public function setUrl($url)
    {
        if (!is_null($url)) {
            if (!preg_match('@^https?://@', $url)) {
                throw new \InvalidArgumentException(sprintf('Invalid url: %s', $url));
            }

            $this->url = $url;
        } else {
            $this->url = null;
        }

        return $this;
    }
954713
public function setBaseId( $value )
	{
		if ( $value == $this->getBaseId() ) { return; }

		$this->_values['baseid'] = ( $value !== null ? (int) $value : null );
		$this->setModified();
	}
916196
public function setBaseUri($baseUri)
    {
        if (is_string($baseUri)) {
            $baseUri = new Uri($baseUri);
        }

        $this->attributes[self::ATTRIBUTE_BASE_URI] = $baseUri;
    }
952854
public function setUrl($url)
    {
        if (filter_var($url, FILTER_VALIDATE_URL) !== $url) {
            throw new \Exception('Invalid URL: '.$url);
        }
        $this->url = $url;
    }
181756
public function setBaseHost($baseHost = null)
    {
        $this->log->debug('Setting Router baseHost to ' . $baseHost);
        $this->baseHost = $baseHost;
        return $this;
    }
715578
public function setRequest(BaseRequest $request)
    {
        foreach ($request as $prop => $value) {
            $this->$prop = $value;
        }
    }