Page MenuHomePhorge

final class PhutilURI
libphutil Technical Documentation (Parsers)

Structural representation of a URI.

This class handles URIs of two types: standard URIs and Git URIs.

Standard URIs look like proto://user:pass@domain:port/path?query#fragment. Almost all URIs are in this form.

Git URIs look like user@host:path. These URIs are used by Git and SCP and have an implicit "ssh" protocol, no port, and interpret paths as relative instead of absolute.

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

public function __construct($uri, $params)

This method is not documented.
Parameters
$uri
$params
Return
this//Implicit.//

public function __toString()

This method is not documented.
Return
wild

public function setQueryParam($key, $value)

This method is not documented.
Parameters
$key
$value
Return
wild

public function setQueryParams($params)

This method is not documented.
Parameters
array$params
Return
wild

public function getQueryParams()

This method is not documented.
Return
wild

public function getQueryParamsAsMap()

This method is not documented.
Return
wild

public function getQueryParamsAsPairList()

This method is not documented.
Return
wild

public function appendQueryParam($key, $value)

This method is not documented.
Parameters
$key
$value
Return
wild

public function removeAllQueryParams()

This method is not documented.
Return
wild

public function removeQueryParam($remove_key)

This method is not documented.
Parameters
$remove_key
Return
wild

public function replaceQueryParam($replace_key, $replace_value)

This method is not documented.
Parameters
$replace_key
$replace_value
Return
wild

private function insertQueryParam($key, $value, $idx)

This method is not documented.
Parameters
$key
$value
$idx
Return
wild

private function initializeQueryParams($uri, $params)

This method is not documented.
Parameters
$uri
array$params
Return
wild

public function setProtocol($protocol)

This method is not documented.
Parameters
$protocol
Return
wild

public function getProtocol()

This method is not documented.
Return
wild

public function setDomain($domain)

This method is not documented.
Parameters
$domain
Return
wild

public function getDomain()

This method is not documented.
Return
wild

public function setPort($port)

This method is not documented.
Parameters
$port
Return
wild

public function getPort()

This method is not documented.
Return
wild

public function getPortWithProtocolDefault()

This method is not documented.
Return
wild

public function setPath($path)

This method is not documented.
Parameters
$path
Return
wild

public function appendPath($path)

This method is not documented.
Parameters
$path
Return
wild

public function getPath()

This method is not documented.
Return
wild

public function setFragment($fragment)

This method is not documented.
Parameters
$fragment
Return
wild

public function getFragment()

This method is not documented.
Return
wild

public function setUser($user)

This method is not documented.
Parameters
$user
Return
wild

public function getUser()

This method is not documented.
Return
wild

public function setPass($pass)

This method is not documented.
Parameters
$pass
Return
wild

public function getPass()

This method is not documented.
Return
wild

public function alter($key, $value)

This method is not documented.
Parameters
$key
$value
Return
wild

public function isGitURI()

This method is not documented.
Return
wild

public function setType($type)

This method is not documented.
Parameters
$type
Return
wild

public function getType()

This method is not documented.
Return
wild

private function isGitURIPattern($uri)

This method is not documented.
Parameters
$uri
Return
wild