A class for uploading Foxx application zips to a database

package ArangoDBClient
since 3.1
inherited_from \ArangoDBClient\Handler

 Methods

Construct a new handler

__construct(\ArangoDBClient\Connection $connection) 
Inherited

Parameters

$connection

\ArangoDBClient\Connection
  • connection to be used

Upload and install a foxx app.

installFoxxZip(string $localZip, string $mountPoint, array $options = array()) : array
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$localZip

string
  • the path to the local foxx-app zip-archive to upload/install

$mountPoint

string
  • the mount-point for the app, must begin with a '/'

$options

array
  • for future usage

Exceptions

\ArangoDBClient\ClientException

Returns

array- the server response

Remove a foxx-app.

removeFoxxApp(string $mountPoint, array $options = array()) : array
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$mountPoint

string
  • the mount-point for the app, must begin with a '/'

$options

array
  • for future usage

Exceptions

\ArangoDBClient\ClientException

Returns

array- the server response

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