Class UrlHelper
Some helper methods to construct and process URLs
Methods summary
public static
string
|
#
getDocumentIdFromLocation( string $location )
Get the document id from a location header
Get the document id from a location header
Parameters
- $location
- HTTP response location header
Returns
string
- document id parsed from header
|
public static
string
|
#
buildUrl( string $baseUrl, array $parts = [] )
Construct a URL from a base URL and additional parts, separated with '/' each
Construct a URL from a base URL and additional parts, separated with '/' each
This function accepts variable arguments.
Parameters
Returns
|
public static
string
|
#
appendParamsUrl( string $baseUrl, array $params )
Append parameters to a URL
Append parameters to a URL
Parameter values will be URL-encoded
Parameters
Returns
|
public static
string
|
#
getBoolString( mixed $value )
Get a string from a boolean value
Get a string from a boolean value
Parameters
Returns
string
- "true" if $value evaluates to true, "false" otherwise
|