public function setAuthority(string $str)
	{
		$parts = parse_url($str);

		if (empty($parts['host']) && ! empty($parts['path']))
		{
			$parts['host'] = $parts['path'];
			unset($parts['path']);
		}

		$this->applyParts($parts);

		return $this;
	}
public function setAuthority(string $str)
	{
		$parts = parse_url($str);

		if (empty($parts['host']) && ! empty($parts['path']))
		{
			$parts['host'] = $parts['path'];
			unset($parts['path']);
		}

		$this->applyParts($parts);

		return $this;
	}
public function setAuthority ( string $ str ) { $ parts = parse_url ( $ str ) ; if ( empty ( $ parts [ 'host' ] ) && ! empty ( $ parts [ 'path' ] ) ) { $ parts [ 'host' ] = $ parts [ 'path' ] ; unset ( $ parts [ 'path' ] ) ; } $ this -> applyParts ( $ parts ) ; return $ this ; }
Parses the given string an saves the appropriate authority pieces.

@param string $str

@return $this
Parses the given string an saves the appropriate authority pieces .