A base class for REST-based handlers

package ArangoDBClient
inherited_from \ArangoDBClient\Handler

 Methods

Construct a new handler

__construct(\ArangoDBClient\Connection $connection) 
Inherited

Parameters

$connection

\ArangoDBClient\Connection
  • connection to be used

Clears the AQL query result cache for the current database

clear() 

Exceptions

\ArangoDBClient\Exception

Globally turns off the AQL query result cache

disable() 

Exceptions

\ArangoDBClient\Exception

Globally turns on the AQL query result cache

enable() 

Exceptions

\ArangoDBClient\Exception

Globally sets the AQL query result cache to demand mode

enableDemandMode() 

Exceptions

\ArangoDBClient\Exception

Returns the entries from the query cache in current database

getEntries() : array

Exceptions

\ArangoDBClient\Exception

Returns

array- entries in query cache

Returns the AQL query result cache properties

getProperties() : array

Exceptions

\ArangoDBClient\Exception

Returns

array

Sets the document class to use

setDocumentClass(string $class) : \ArangoDBClient\DocumentClassable
Inherited

Parameters

$class

string

Document class to use

Returns

\ArangoDBClient\DocumentClassable

Sets the edge class to use

setEdgeClass(string $class) : \ArangoDBClient\DocumentClassable
Inherited

Parameters

$class

string

Edge class to use

Returns

\ArangoDBClient\DocumentClassable

Adjusts the global AQL query result cache properties

setProperties(array $properties) : array

Parameters

$properties

array
  • the query result cache properties. the following properties can be used:
    • maxResults: maximum number of results that the query result cache will hold per database
    • mode: turns the query result cache on or off, or sets it to demand mode. Possible values are "on", "off", or "demand".

Exceptions

\ArangoDBClient\Exception

Returns

array

Add a transaction header to the array of headers in case this is a transactional operation

addTransactionHeader(array $headers, mixed $collection) 
Inherited

Parameters

$headers

array
  • already existing headers

$collection

mixed
  • any type of collection (can be StreamingTransactionCollection or other)

Return the connection object

getConnection() : \ArangoDBClient\Connection
Inherited

Returns

\ArangoDBClient\Connection- the connection object

Return a connection option This is a convenience function that calls json_encode_wrapper on the connection

getConnectionOption($optionName) : mixed
Inherited

Parameters

$optionName

  • The option to return a value for

Exceptions

\ArangoDBClient\ClientException

Returns

mixed- the option's value

Helper function that runs through the options given and includes them into the parameters array given.

includeOptionsInBody(array $options, array $body, array $includeArray = array()) : array
Inherited

Only options that are set in $includeArray will be included. This is only for options that are to be sent to the ArangoDB server in a json body(like 'limit', 'skip', etc...) .

Parameters

$options

array
  • The options array that holds the options to include in the parameters

$body

array
  • The array into which the options will be included.

$includeArray

array
  • The array that defines which options are allowed to be included, and what their default value is. for example: 'waitForSync'=>true

Returns

array$params - array of parameters for use in a url

Return a json encoded string for the array passed.

json_encode_wrapper(array $body) : string
Inherited

This is a convenience function that calls json_encode_wrapper on the connection

Parameters

$body

array
  • The body to encode into json

Exceptions

\ArangoDBClient\ClientException

Returns

string- json string of the body that was passed

Turn a value into a collection name

makeCollection(mixed $value) : string
Inherited

Parameters

$value

mixed
  • document, collection or string

Exceptions

\ArangoDBClient\ClientException

Returns

string- collection name

 Properties

 

Document class to use

$_documentClass : string

Default

'\ArangoDBClient\Document'
 

Edge class to use

$_edgeClass : string

Default

'\ArangoDBClient\Edge'
 

Connection object

$_connection 

Default

param