public function setScheme(string $str)
	{
		$str = strtolower($str);
		$str = preg_replace('#:(//)?$#', '', $str);

		$this->scheme = $str;

		return $this;
	}
public function setScheme(string $str)
	{
		$str = strtolower($str);
		$str = preg_replace('#:(//)?$#', '', $str);

		$this->scheme = $str;

		return $this;
	}
public function setScheme ( string $ str ) { $ str = strtolower ( $ str ) ; $ str = preg_replace ( '#:(//)?$#' , '' , $ str ) ; $ this -> scheme = $ str ; return $ this ; }
Sets the scheme for this URI.

Because of the large number of valid schemes we cannot limit this
to only http or https.

@see https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml

@param $str

@return $this
Sets the scheme for this URI .