\triagens\ArangoDbUrlHelper

Some helper methods to construct and process URLs


Summary

Methods
Properties
Constants
getDocumentIdFromLocation()
getCollectionIdFromLocation()
buildUrl()
appendParamsUrl()
getBoolString()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getDocumentIdFromLocation()

getDocumentIdFromLocation(string $location) : string

Get the document id from a location header

Parameters

string $location
  • HTTP response location header

Returns

string —
  • document id parsed from header

getCollectionIdFromLocation()

getCollectionIdFromLocation(string $location) : string

Get the collection id from a location header

Parameters

string $location
  • HTTP response location header

Returns

string —
  • collection id parsed from header

buildUrl()

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

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

This function accepts variable arguments.

Parameters

string $baseUrl
  • base URL
array $parts
  • URL parts to append

Returns

string —
  • assembled URL

appendParamsUrl()

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

Append parameters to a URL

Parameter values will be URL-encoded

Parameters

string $baseUrl
  • base URL
array $params
  • an array of parameters

Returns

string —
  • the assembled URL

getBoolString()

getBoolString(mixed $value) : string

Get a string from a boolean value

Parameters

mixed $value
  • the value

Returns

string —
  • "true" if $value evaluates to true, "false" otherwise