Url
class Url (View source)
Constants
| PATH_ASCII |
|
| PATH_UNICODE |
|
| PATH_SLUG |
|
| SORT_QUERY |
|
Properties
| string | $scheme | ||
| string | $host | ||
| string | $port | ||
| string | $user | ||
| string | $pass | ||
| string | $path | ||
| string | $query | ||
| string | $fragment |
Methods
__construct(string $url)
Parse URL
static
setDefaultPorts(array $ports)
Sets default ports
static
setSlugDict(array $dict)
Sets slug dictionary
static Url
application(bool $query)
Get Url instance from current url
normalize(int $configs = 0)
Normalize path and querystring
static string
canonpath(string $path)
Canon path
string|null
__get(string $name)
Get value for a URL component
__set(string $name, string|null $value)
Set value for a URL component
string
__toString()
Compose string
Details
__construct(string $url)
Parse URL
static
setDefaultPorts(array $ports)
Sets default ports
static
setSlugDict(array $dict)
Sets slug dictionary
static Url
application(bool $query)
Get Url instance from current url
normalize(int $configs = 0)
Normalize path and querystring
static string
canonpath(string $path)
Canon path
string|null
__get(string $name)
Get value for a URL component
__set(string $name, string|null $value)
Set value for a URL component
string
__toString()
Compose string