Constants

OPTION_DETAILS

OPTION_DETAILS

details for server version

Properties

$_connection

$_connection : 

Connection object

Type

Methods

getServerVersion()

getServerVersion(boolean $details) : string

Get the server version

This will throw if the version cannot be retrieved

Parameters

boolean $details
  • True to get a more detailed response

Throws

\triagens\ArangoDb\Exception

Returns

string —
  • a string holding the ArangoDB version

getServerRole()

getServerRole() : string

Get the server role

This will throw if the role cannot be retrieved

Throws

\triagens\ArangoDb\Exception

Returns

string —
  • a string holding the server role (e.g. UNDEFINED, COORDINATOR, DBSERVER)

getServerTime()

getServerTime() : double

Get the server time

This will throw if the time cannot be retrieved

Throws

\triagens\ArangoDb\Exception

Returns

double —
  • a double holding the timestamp

getServerLog()

getServerLog(array $options) : array

Get the server log

This will throw if the log cannot be retrieved

Parameters

array $options
  • an array of options that define the result-set:

    Options are :

  • 'upto' - returns all log entries up to a log-level. Note that log-level must be one of:
  • fatal / 0
  • error / 1
  • warning / 2
  • info / 3
  • debug / 4
  • 'level' - limits the log entries to the ones defined in level. Note that `level` and `upto` are mutably exclusive.
  • 'offset' - skip the first offset entries.
  • 'size' - limit the number of returned log-entries to size.
  • 'start' - Returns all log entries such that their log-entry identifier is greater or equal to lid.
  • 'sort' - Sort the log-entries either ascending if direction is asc, or descending if it is desc according to their lid. Note that the lid imposes a chronological order.
  • 'search' - Only return the log-entries containing the text string...

Throws

\triagens\ArangoDb\Exception

Returns

array —
  • an array holding the various attributes of a log: lid, level, timestamp, text and the total amount of log entries before pagination.

flushServerModuleCache()

flushServerModuleCache() : array

Flush the server's modules cache The call triggers a flush of the modules cache on the server. See Modules Cache for details about this cache.

This will throw if the modules cache cannot be flushed

Throws

\triagens\ArangoDb\Exception

Returns

array

reloadServerRouting()

reloadServerRouting() : array

Reload the server's routing information The call triggers a reload of the routing information from the _routing collection

This will throw if the routing cannot be reloaded

Throws

\triagens\ArangoDb\Exception

Returns

array

getServerStatistics()

getServerStatistics() : array

Get the server statistics Returns the statistics information. The returned objects contains the statistics figures, grouped together according to the description returned by _admin/statistics-description.

For instance, to access a figure userTime from the group system, you first select the sub-object describing the group stored in system and in that sub-object the value for userTime is stored in the attribute of the same name.In case of a distribution, the returned object contains the total count in count and the distribution list in counts. For more information on the statistics returned, please lookup the statistics interface description at

Throws

\triagens\ArangoDb\Exception

Returns

array

getServerStatisticsDescription()

getServerStatisticsDescription(array $options) : array

Returns a description of the statistics returned by getServerStatistics().

The returned objects contains a list of statistics groups in the attribute groups and a list of statistics figures in the attribute figures. For more information on the statistics returned, please lookup the statistics interface description at

Parameters

array $options
  • an array of options that define the result-set:

    Options are :

  • 'granularity' - use minutes for a granularity of minutes, hours for hours, and days for days. The default is minutes.
  • 'figures' - a list of figures, comma-separated. Possible figures are httpConnections. You can use all to get all figures. The default is httpConnections.
  • 'length' - If you want a time series, the maximal length of the series as integer. You can use all to get all available information. You can use current to get the latest interval.

Throws

\triagens\ArangoDb\Exception

Returns

array

getConnection()

getConnection() : \triagens\ArangoDb\Connection

Return the connection object

Returns

\triagens\ArangoDb\Connection
  • the connection object

getConnectionOption()

getConnectionOption( $optionName) : mixed

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

Parameters

$optionName
  • The option to return a value for

Returns

mixed —
  • the option's value

getCursorOptions()

getCursorOptions(mixed $options) : array

Return an array of cursor options

Parameters

mixed $options
  • $options might be a boolean sanitize value, or an array of options, with or without a '_sanitize' key.

Returns

array —
  • array of options

json_encode_wrapper()

json_encode_wrapper(array $body) : string

Return a json encoded string for the array passed.

This is a convenience function that calls json_encode_wrapper on the connection

Parameters

array $body
  • The body to encode into json

Returns

string —
  • json string of the body that was passed

validateAndIncludeOldSingleParameterInParams()

validateAndIncludeOldSingleParameterInParams(array $options, array $params, mixed $parameter) : array

Helper function that validates and includes an old single method parameter setting into the parameters array given.

This is only for keeping backwards-compatibility where methods had for example a parameter which was called 'policy' and which was later changed to being an array of options, so more than one options can be passed easily. This is only for options that are to be sent to the ArangoDB server.

Parameters

array $options
  • The options array that may hold the policy to include in the parameters. If it's not an array, then the value is the policy value.
array $params
  • The parameters into which the options will be included.
mixed $parameter
  • the old single parameter key to use.

Returns

array —

$params - array of parameters for use in a url

includeOptionsInParams()

includeOptionsInParams(array $options, array $params, array $includeArray) : array

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

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 form of url parameters (like 'waitForSync', 'keepNull', etc...) .

Parameters

array $options
  • The options array that holds the options to include in the parameters
array $params
  • The parameters into which the options will be included.
array $includeArray
  • 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

includeOptionsInBody()

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

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

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

array $options
  • The options array that holds the options to include in the parameters
array $body
  • The array into which the options will be included.
array $includeArray
  • 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