Uri
final class Uri (View source)
Methods
Retrieve the normalized scheme component
Retrieve the raw scheme component
No description
Retrieve the normalized userinfo component
Retrieve the raw userinfo component
No description
Retrieve the normalized username
Retrieve the raw username
Retrieve the normalized password
Retrieve the raw password
Retrieve the normalized host component
Retrieve the raw host component
Retrieve the normalized port component
Retrieve the normalized path component
Retrieve the raw path component
Retrieve the normalized query component
Retrieve the raw query component
Retrieve the normalized fragment component
Retrieve the raw fragment component
No description
Recompose the normalized URI
Recompose the raw URI
No description
No description
Return the internal state of the URI
No description
No description
Details
__construct(string $uri, Uri|null $baseUrl = null)
No description
string|null
getScheme()
Retrieve the normalized scheme component
Retrieves the normalized scheme component.
string|null
getRawScheme()
Retrieve the raw scheme component
Retrieves the raw (non-normalized) scheme component.
Uri
withScheme(string|null $scheme)
No description
string|null
getUserInfo()
Retrieve the normalized userinfo component
Retrieves the normalized userinfo component.
string|null
getRawUserInfo()
Retrieve the raw userinfo component
Retrieves the raw (non-normalized) userinfo component.
Uri
withUserInfo(string|null $userinfo)
No description
string|null
getUsername()
Retrieve the normalized username
Retrieves the normalized username part (the text before the first : character) from the userinfo component.
string|null
getRawUsername()
Retrieve the raw username
Retrieves the raw (non-normalized) username part (the text before the first : character) from userinfo component.
string|null
getPassword()
Retrieve the normalized password
Retrieves the normalized password part (the text after the first : character) from the userinfo component.
string|null
getRawPassword()
Retrieve the raw password
Retrieves the raw (non-normalized) password part (the text after the first : character) from the userinfo component.
string|null
getHost()
Retrieve the normalized host component
Retrieves the normalized host component.
string|null
getRawHost()
Retrieve the raw host component
Retrieves the raw (non-normalized) host component.
Uri
withHost(string|null $host)
No description
int|null
getPort()
Retrieve the normalized port component
Retrieves the normalized port component.
Uri
withPort(int|null $port)
No description
string
getPath()
Retrieve the normalized path component
Retrieves the normalized path component.
string
getRawPath()
Retrieve the raw path component
Retrieves the raw (non-normalized) path component.
Uri
withPath(string $path)
No description
string|null
getQuery()
Retrieve the normalized query component
Retrieves the normalized query component.
string|null
getRawQuery()
Retrieve the raw query component
Retrieves the raw (non-normalized) query component.
Uri
withQuery(string|null $query)
No description
string|null
getFragment()
Retrieve the normalized fragment component
Retrieves the normalized fragment component.
string|null
getRawFragment()
Retrieve the raw fragment component
Retrieves the raw (non-normalized) fragment component.
Uri
withFragment(string|null $fragment)
No description
bool
equals(Uri $uri, UriComparisonMode $comparisonMode = \Uri\UriComparisonMode::ExcludeFragment)
Check if two URIs are equivalent
Checks if two URIs are equivalent.
string
toString()
Recompose the normalized URI
Recomposes the normalized URI to a string.
string
toRawString()
Recompose the raw URI
Recomposes the raw (non-normalized) URI to a string.
Uri
resolve(string $uri)
No description
array
__serialize()
No description
void
__unserialize(array $data)
No description
array
__debugInfo()
Return the internal state of the URI
Returns the internal state of the URI.
UriHostType|null
getHostType()
No description
UriType|null
getUriType()
No description