public function withScheme(string $scheme): self
    {
        $newConstraints = $this->constraints;
        $newConstraints[self::CONSTRAINT_SCHEME] = $scheme;
        return new static($newConstraints);
    }
public function withScheme(string $scheme): self
    {
        $newConstraints = $this->constraints;
        $newConstraints[self::CONSTRAINT_SCHEME] = $scheme;
        return new static($newConstraints);
    }
public function withScheme ( string $ scheme ) : self { $ newConstraints = $ this -> constraints ; $ newConstraints [ self :: CONSTRAINT_SCHEME ] = $ scheme ; return new static ( $ newConstraints ) ; }
Create a new instance with the scheme constraint added

@param string $scheme The URI scheme to force, usually "http" or "https"
@return UriConstraints
Create a new instance with the scheme constraint added