Url
class Url implements JsonSerializable
Mutable 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
static | $defaultPorts | ||
string | $scheme | ||
string | $user | ||
string | $password | ||
string | $host | ||
int | $port | ||
string | $path | ||
string | $query | ||
string | $fragment | ||
string read-only | $absoluteUrl | ||
string read-only | $authority | ||
string read-only | $hostUrl | ||
string read-only | $basePath | ||
string read-only | $baseUrl | ||
string read-only | $relativeUrl | ||
array read-only | $queryParameters |
Methods
No description
No description
No description
No description
No description
No description
Returns the part of domain.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Returns the [user[:pass]@]host[:port] part of URI.
Returns the scheme and authority part of URI.
URL comparison.
Transforms URL to canonical form.
No description
No description
No description
Similar to rawurldecode, but preserves reserved chars encoded.
Parses query string. Is affected by directive arg_separator.input.
Details
at line 67
__construct(UrlImmutable|null $url = null)
No description
at line 90
Url
setScheme(string $scheme)
No description
at line 97
string
getScheme()
No description
at line 103
Url
setUser(string $user)
No description
at line 110
string
getUser()
No description
at line 116
Url
setPassword(string $password)
No description
at line 123
string
getPassword()
No description
at line 129
Url
setHost(string $host)
No description
at line 137
string
getHost()
No description
at line 146
string
getDomain(int $level = 2)
Returns the part of domain.
at line 158
Url
setPort(int $port)
No description
at line 165
int|null
getPort()
No description
at line 171
int|null
getDefaultPort()
No description
at line 177
Url
setPath(string $path)
No description
at line 188
string
getPath()
No description
at line 194
Url
setQuery(string|array $query)
No description
at line 201
Url
appendQuery(string|array $query)
No description
at line 210
string
getQuery()
No description
at line 216
array
getQueryParameters()
No description
at line 222
mixed
getQueryParameter(string $name)
No description
at line 228
Url
setQueryParameter(string $name, mixed $value)
No description
at line 235
Url
setFragment(string $fragment)
No description
at line 242
string
getFragment()
No description
at line 248
string
getAbsoluteUrl()
No description
at line 259
string
getAuthority()
Returns the [user[:pass]@]host[:port] part of URI.
at line 276
string
getHostUrl()
Returns the scheme and authority part of URI.
at line 284
string
getBasePath()
deprecated
deprecated
No description
at line 293
string
getBaseUrl()
deprecated
deprecated
No description
at line 301
string
getRelativeUrl()
deprecated
deprecated
No description
at line 311
bool
isEqual(UrlImmutable $url)
URL comparison.
at line 335
Url
canonicalize()
Transforms URL to canonical form.
at line 348
string
__toString()
No description
at line 354
string
jsonSerialize()
No description
at line 361
final array
export()
internal |
No description
at line 387
static string
unescape(string $s, string $reserved = '%;/?:@&=+$,')
Similar to rawurldecode, but preserves reserved chars encoded.
at line 407
static array
parseQuery(string $s)
Parses query string. Is affected by directive arg_separator.input.