Url
final class Url (View source)
Methods
Retrieve the scheme component
No description
Retrieve the username component
No description
Retrieve the password component
No description
Retrieve the host component as an ASCII string
Retrieve the host component as an Unicode string
Retrieve the port component
Retrieve the path component
Retrieve the query component
Retrieve the fragment component
No description
Recompose the URL as an ASCII string
Recompose the URL as a Unicode string
No description
No description
Return the internal state of the URL
No description
No description
Details
__construct(string $uri, Url|null $baseUrl = null, array $softErrors = null)
No description
string
getScheme()
Retrieve the scheme component
Retrieves the scheme component.
Url
withScheme(string $scheme)
No description
string|null
getUsername()
Retrieve the username component
Retrieves the username component.
Url
withUsername(string|null $username)
No description
string|null
getPassword()
Retrieve the password component
Retrieves the password component.
Url
withPassword(string|null $password)
No description
string|null
getAsciiHost()
Retrieve the host component as an ASCII string
Retrieves the host component as a string using punycode transcription instead of Unicode characters.
string|null
getUnicodeHost()
Retrieve the host component as an Unicode string
Retrieves the host component as a string, which may contain Unicode characters.
Url
withHost(string|null $host)
No description
int|null
getPort()
Retrieve the port component
Retrieves the port component.
Url
withPort(int|null $port)
No description
string
getPath()
Retrieve the path component
Retrieves the path component.
Url
withPath(string $path)
No description
string|null
getQuery()
Retrieve the query component
Retrieves the query component.
Url
withQuery(string|null $query)
No description
string|null
getFragment()
Retrieve the fragment component
Retrieves the fragment component.
Url
withFragment(string|null $fragment)
No description
bool
equals(Url $url, UriComparisonMode $comparisonMode = \Uri\UriComparisonMode::ExcludeFragment)
Check if two URLs are equivalent
Checks if two URLs are equivalent.
string
toAsciiString()
Recompose the URL as an ASCII string
Recomposes the URL as an ASCII string, using punycode transcription instead of Unicode characters in the host component.
string
toUnicodeString()
Recompose the URL as a Unicode string
Recomposes the URL as a string, where the host component may contain Unicode characters.
Url
resolve(string $uri, array $softErrors = null)
No description
array
__serialize()
No description
void
__unserialize(array $data)
No description
array
__debugInfo()
Return the internal state of the URL
Returns the internal state of the URL.
UrlHostType|null
getHostType()
No description
bool
isSpecialScheme()
No description