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 list of slow queries

clearSlow() 

Exceptions

\ArangoDBClient\Exception

Returns the list of currently executing queries

getCurrent() : array

Exceptions

\ArangoDBClient\Exception

Returns

array

Returns the list of slow queries

getSlow() : array

Exceptions

\ArangoDBClient\Exception

Returns

array

Kills a specific query

kill(string $id) : boolean

This will send an HTTP DELETE command to the server to terminate the specified query

Parameters

$id

string
  • query id

Exceptions

\ArangoDBClient\Exception

Returns

boolean

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

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