Uri
class Uri (View source)
Constants
ASCII |
Use with |
UNICODE |
Use with |
Properties
static protected array | $defaultPorts | Define default port to schemes, you can customize in a extended class
If put a new port with scheme he is removed in final url, eg. 'myscheme:900',
ClassExtendedFromUri::normalize('myscheme://host:900/test') => myscheme://host/test |
|
static protected array | $defaultSchemes | Define default schemes, you can customize in a extended class
If put a new scheme the host is converted to lower-case, eg. 'whatsapp',
Uri::normalize('whatsapp://SEND?text=foo') => whatsapp://send?text=foo |
Methods
Convert text to URL format
Canonicalize paths
Normalize URL, include canonicalized path
Create URL based in public root application, for example,
if you install inphinit in a sub path like: http://site/foo/bar/myapplication/
Reorder querystring by "keys"
if: Uri::canonquery('z=1&u=2&a=5')
returns a=5&u=2&z=1
Details
at line 45
static string
encodepath(string $path, int $type = null)
Convert text to URL format
at line 69
static string
canonpath(string $path)
Canonicalize paths
at line 83
static string|bool
normalize(string $url)
Normalize URL, include canonicalized path
at line 148
static string
root(string $path = '')
Create URL based in public root application, for example,
if you install inphinit in a sub path like: http://site/foo/bar/myapplication/
at line 161
static string
canonquery($query, $prefix = '')
Reorder querystring by "keys"
if: Uri::canonquery('z=1&u=2&a=5')
returns a=5&u=2&z=1