UrlImmutable
class UrlImmutable implements JsonSerializable
Immutable representation of a URL.
scheme user password host port path query fragment
| | | | | | | |
/--\ /--\ /------\ /-------\ /--\/------------\ /--------\ /------\
http://john:x0y17575@nette.org:8042/en/manual.php?name=param#fragment <-- absoluteUrl
\______\__________________________/
| |
hostUrl authority
Properties
| string read-only | $scheme | ||
| string read-only | $user | ||
| string read-only | $password | ||
| string read-only | $host | ||
| int read-only | $port | ||
| string read-only | $path | ||
| string read-only | $query | ||
| string read-only | $fragment | ||
| string read-only | $absoluteUrl | ||
| string read-only | $authority | ||
| string read-only | $hostUrl | ||
| array read-only | $queryParameters |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Returns the entire URI including query string and fragment.
Returns the [user[:pass]@]host[:port] part of URI.
Returns the scheme and authority part of URI.
No description
No description
Resolves relative URLs in the same way as browser. If path is relative, it is resolved against base URL, if begins with /, it is resolved against the host root.
No description
No description
No description
Details
at line 61
__construct(Url $url)
No description
at line 68
UrlImmutable
withScheme(string $scheme)
No description
at line 77
string
getScheme()
No description
at line 84
UrlImmutable
withUser(string $user)
deprecated
deprecated
No description
at line 94
string
getUser()
deprecated
deprecated
No description
at line 101
UrlImmutable
withPassword(string $password)
deprecated
deprecated
No description
at line 111
string
getPassword()
deprecated
deprecated
No description
at line 118
UrlImmutable
withoutUserInfo()
deprecated
deprecated
No description
at line 127
UrlImmutable
withHost(string $host)
No description
at line 136
string
getHost()
No description
at line 142
string
getDomain(int $level = 2)
No description
at line 154
UrlImmutable
withPort(int $port)
No description
at line 163
int|null
getPort()
No description
at line 169
int|null
getDefaultPort()
No description
at line 175
UrlImmutable
withPath(string $path)
No description
at line 188
string
getPath()
No description
at line 194
UrlImmutable
withQuery(string|array $query)
No description
at line 202
string
getQuery()
No description
at line 208
UrlImmutable
withQueryParameter(string $name, mixed $value)
No description
at line 216
array
getQueryParameters()
No description
at line 222
array|string|null
getQueryParameter(string $name)
No description
at line 228
UrlImmutable
withFragment(string $fragment)
No description
at line 236
string
getFragment()
No description
at line 245
string
getAbsoluteUrl()
Returns the entire URI including query string and fragment.
at line 256
string
getAuthority()
Returns the [user[:pass]@]host[:port] part of URI.
at line 273
string
getHostUrl()
Returns the scheme and authority part of URI.
at line 280
string
__toString()
No description
at line 286
bool
isEqual(Url|self $url)
No description
at line 296
UrlImmutable
resolve(string $reference)
Resolves relative URLs in the same way as browser. If path is relative, it is resolved against base URL, if begins with /, it is resolved against the host root.
at line 327
protected string
mergePath(string $path)
| internal |
No description
at line 334
string
jsonSerialize()
No description
at line 341
final array
export()
| internal |
No description