UriHelper
class UriHelper (View source)
Uri Helper
This class provides an UTF-8 safe version of parse_url().
This class is a fork from Joomla Uri.
Constants
CHAR_SUB_DELIMS |
Sub-delimiters used in query strings and fragments. |
CHAR_UNRESERVED |
Unreserved characters used in paths, query strings, and fragments. |
Methods
Build a query from a array (reverse of the PHP parse_str()).
Does a UTF-8 safe version of PHP parse_url function
parseQuery
filterScheme
Filter a query string to ensure it is propertly encoded.
Split a query value into a key/value tuple.
Filter a query string key or value, or a fragment.
Filter a fragment value to ensure it is properly encoded.
Filters the path of a URI to ensure it is properly encoded.
Resolves //, .
decode
encode
Details
at line line 46
static string
buildQuery(array $params)
Build a query from a array (reverse of the PHP parse_str()).
at line line 61
static mixed
parseUrl(string $url)
Does a UTF-8 safe version of PHP parse_url function
at line line 95
static mixed
parseQuery(string $query)
parseQuery
at line line 109
static string
filterScheme(string $scheme)
filterScheme
at line line 131
static string
filterQuery(string $query)
Filter a query string to ensure it is propertly encoded.
Ensures that the values in the query string are properly urlencoded.
at line line 167
static array
splitQueryValue(string $value)
Split a query value into a key/value tuple.
at line line 186
static string
filterQueryOrFragment(string $value)
Filter a query string key or value, or a fragment.
at line line 205
static string
filterFragment(string $fragment)
Filter a fragment value to ensure it is properly encoded.
at line line 227
static string
filterPath(string $path)
Filters the path of a URI to ensure it is properly encoded.
at line line 253
static string
cleanPath(string $path)
Resolves //, .
./ and ./ from a path and returns the result. Eg:
/foo/bar/../boo.php => /foo/boo.php /foo/bar/../../boo.php => /boo.php /foo/bar/.././/boo.php => /foo/boo.php
at line line 289
static array|string
decode(string $string)
decode
at line line 313
static array|string
encode(string $string)
encode