URL
extends PlatformUtility
in package
Provides access to url utility functions.
Tags
Table of Contents
- createQuery() : string|null
- Builds a url parameter string from an associative array.
- decode() : string
- Decode a URL
- encode() : string
- Encode a URL
- getHost() : string
- Get the host part of a url
- getPath() : string
- Get the path part of a url
- getQueryArray() : array<string|int, mixed>
- Converts a url string to a array with url parameters as key value pairs.
- getQueryString() : string
- Get the url parameters part of a url
Methods
createQuery()
Builds a url parameter string from an associative array.
public
createQuery(array<string|int, mixed> $data) :
string|null
Parameters
- $data : array<string|int, mixed>
-
[key => value]
Tags
Return values
string|null —decode()
Decode a URL
public
decode(string $url) :
string
Parameters
- $url : string
Tags
Return values
string —encode()
Encode a URL
public
encode(string $url) :
string
Parameters
- $url : string
Tags
Return values
string —getHost()
Get the host part of a url
public
getHost(string $url) :
string
Parameters
- $url : string
Tags
Return values
string —getPath()
Get the path part of a url
public
getPath(string $url) :
string
Parameters
- $url : string
Tags
Return values
string —getQueryArray()
Converts a url string to a array with url parameters as key value pairs.
public
getQueryArray(string $url) :
array<string|int, mixed>
Parameters
- $url : string
Tags
Return values
array<string|int, mixed> —getQueryString()
Get the url parameters part of a url
public
getQueryString(string $url) :
string
Parameters
- $url : string