$_apiVersion
$_apiVersion : string
Api Version
Provides access to the ArangoDB server
As all access is done using HTTP, we do not need to establish a
persistent connection and keep its state.
Instead, connections are established on the fly for each request
and are destroyed afterwards.
__construct(array $options) : \triagens\ArangoDb\Connection
Set up the connection object, validate the options provided
array | $options |
|
get(string $url, array $customerHeader) : \triagens\ArangoDb\HttpResponse
Issue an HTTP GET request
string | $url |
|
array | $customerHeader |
post(string $url, string $data) : \triagens\ArangoDb\HttpResponse
Issue an HTTP POST request with the data provided
string | $url |
|
string | $data |
|
put(string $url, string $data) : \triagens\ArangoDb\HttpResponse
Issue an HTTP PUT request with the data provided
string | $url |
|
string | $data |
|
head(string $url, array $customerHeader) : \triagens\ArangoDb\HttpResponse
Issue an HTTP Head request with the data provided
string | $url |
|
array | $customerHeader |
patch(string $url, string $data) : \triagens\ArangoDb\HttpResponse
Issue an HTTP PATCH request with the data provided
string | $url |
|
string | $data |
|
delete(string $url) : \triagens\ArangoDb\HttpResponse
Issue an HTTP DELETE request with the data provided
string | $url |
|
parseResponse(\triagens\ArangoDb\HttpResponse $response) : \triagens\ArangoDb\HttpResponse
Parse the response return the body values as an assoc array
\triagens\ArangoDb\HttpResponse | $response |
|
stopCaptureBatch() : \triagens\ArangoDb\Batch
Stop capturing commands
getActiveBatch() : \triagens\ArangoDb\Batch
returns the active batch
active batch
setActiveBatch(\triagens\ArangoDb\Batch $batch) : \triagens\ArangoDb\Batch
Sets the active Batch for this connection
\triagens\ArangoDb\Batch | $batch |
|
active batch
json_encode_wrapper(mixed $data, mixed $options) : string
This is a json_encode() wrapper that also checks if the data is utf-8 conform.
internally it calls the check_encoding() method. If that method does not throw an Exception, this method will happily return the json_encoded data.
mixed | $data | the data to encode |
mixed | $options | the options for the json_encode() call |
the result of the json_encode
executeRequest(string $method, string $url, string $data, array $customerHeader) : \triagens\ArangoDb\HttpResponse
Execute an HTTP request and return the results
This function will throw if no connection to the server can be established or if there is a problem during data exchange with the server.
will restore it.
string | $method |
|
string | $url |
|
string | $data |
|
array | $customerHeader |
|
doBatch(mixed $method, string $request) : mixed
This is a helper function to executeRequest that captures requests if we're in batch mode
mixed | $method |
|
string | $request |
|
Batchpart or null if not in batch capturing mode