Url
class Url implements JsonSerializable
Mutable representation of a URL.
scheme user password host port basePath relativeUrl | | | | | | | /--\ /--\ /------\ /-------\ /--\/--\/----------------------------\ http://john:x0y17575@nette.org:8042/en/manual.php?name=param#fragment <-- absoluteUrl \__________________________/\____________/^\________/^\______/ | | | | authority path query fragment
Properties
static array | $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
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
Returns the [user[:pass]@]host[:port] part of URI.
Returns the scheme and authority part of URI.
No description
No description
No description
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 84
__construct(string|Url|UrlImmutable $url = null)
No description
at line 111
Url
setScheme(string $scheme)
No description
at line 118
string
getScheme()
No description
at line 125
Url
setUser(string $user)
No description
at line 132
string
getUser()
No description
at line 139
Url
setPassword(string $password)
No description
at line 146
string
getPassword()
No description
at line 153
Url
setHost(string $host)
No description
at line 161
string
getHost()
No description
at line 170
string
getDomain(int $level = 2)
Returns the part of domain.
at line 183
Url
setPort(int $port)
No description
at line 190
int|null
getPort()
No description
at line 197
Url
setPath(string $path)
No description
at line 207
string
getPath()
No description
at line 217
Url
setQuery($query)
No description
at line 228
Url
appendQuery($query)
No description
at line 237
string
getQuery()
No description
at line 243
array
getQueryParameters()
No description
at line 250
mixed
getQueryParameter(string $name)
No description
at line 263
Url
setQueryParameter(string $name, mixed $value)
No description
at line 271
Url
setFragment(string $fragment)
No description
at line 278
string
getFragment()
No description
at line 284
string
getAbsoluteUrl()
No description
at line 295
string
getAuthority()
Returns the [user[:pass]@]host[:port] part of URI.
at line 312
string
getHostUrl()
Returns the scheme and authority part of URI.
at line 319
string
getBasePath()
No description
at line 326
string
getBaseUrl()
No description
at line 332
string
getRelativeUrl()
No description
at line 342
bool
isEqual(string|Url $url)
URL comparison.
at line 364
Url
canonicalize()
Transforms URL to canonical form.
at line 376
string
__toString()
No description
at line 382
string
jsonSerialize()
No description
at line 389
final array
export()
internal |
No description
at line 398
static string
unescape(string $s, string $reserved = '%;/?:@&=+$,')
Similar to rawurldecode, but preserves reserved chars encoded.
at line 417
static array
parseQuery(string $s)
Parses query string. Is affected by directive arg_separator.input.
Traits
Strict class for better experience.