Some helper methods to construct and process URLs

package ArangoDBClient
since 0.2

 Methods

Append parameters to a URL

appendParamsUrl(string $baseUrl, array $params) : string
Static

Parameter values will be URL-encoded

Parameters

$baseUrl

string
  • base URL

$params

array
  • an array of parameters

Returns

string- the assembled URL

Construct a URL from a base URL and additional parts, separated with '/' each

buildUrl(string $baseUrl, array $parts = array()) : string
Static

This function accepts variable arguments.

Parameters

$baseUrl

string
  • base URL

$parts

array
  • URL parts to append

Returns

string- assembled URL

Get a string from a boolean value

getBoolString(mixed $value) : string
Static

Parameters

$value

mixed
  • the value

Returns

string- "true" if $value evaluates to true, "false" otherwise

Get the document id from a location header

getDocumentIdFromLocation(string $location) : string
Static

Parameters

$location

string
  • HTTP response location header

Returns

string- document id parsed from header