public function setGlobalOverride($uri)
    {
        if (is_string($uri)) {
            // Prepend scheme if not included so parse_url doesn't choke.
            if (strpos($uri, 'http') !== 0) {
                $uri = 'http://' . $uri;
            }
            $uri = new Uri($uri);
        }
        Assert::nullOrIsInstanceOf($uri, UriInterface::class, 'Expected a string, UriInterface, or null. Got: %s');

        $this->globalOverride = $uri;
    }
public function setGlobalOverride($uri)
    {
        if (is_string($uri)) {
            // Prepend scheme if not included so parse_url doesn't choke.
            if (strpos($uri, 'http') !== 0) {
                $uri = 'http://' . $uri;
            }
            $uri = new Uri($uri);
        }
        Assert::nullOrIsInstanceOf($uri, UriInterface::class, 'Expected a string, UriInterface, or null. Got: %s');

        $this->globalOverride = $uri;
    }
public function setGlobalOverride ( $ uri ) { if ( is_string ( $ uri ) ) { // Prepend scheme if not included so parse_url doesn't choke. if ( strpos ( $ uri , 'http' ) !== 0 ) { $ uri = 'http://' . $ uri ; } $ uri = new Uri ( $ uri ) ; } Assert :: nullOrIsInstanceOf ( $ uri , UriInterface :: class , 'Expected a string, UriInterface, or null. Got: %s' ) ; $ this -> globalOverride = $ uri ; }
This overrides the scheme and host for all urls generated including the canonical one.

@param UriInterface|string|null $uri
This overrides the scheme and host for all urls generated including the canonical one .