Provides access to ArangoDB's administration interface

The admin handler utilizes ArangoDB's Admin API.

package ArangoDBClient
since 1.2
inherited_from \ArangoDBClient\Handler

 Methods

Construct a new handler

__construct(\ArangoDBClient\Connection $connection) 
Inherited

Parameters

$connection

\ArangoDBClient\Connection
  • connection to be used

Get the server's storage engine

getEngine() : mixed

This will throw if the engine data cannot be retrieved

since 3.2

Exceptions

\ArangoDBClient\Exception

Returns

mixed- an object returning the engine information

Get the server log

getServerLog(array $options = array()) : array

This will throw if the log cannot be retrieved

since 1.2

Parameters

$options

array
  • 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...
  • Exceptions

    \ArangoDBClient\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.

    Get the server role

    getServerRole() : string

    This will throw if the role cannot be retrieved

    since 2.0

    Exceptions

    \ArangoDBClient\Exception

    Returns

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

    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.

    getServerStatistics() : array

    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

    link This will throw if the statistics cannot be retrieved
    see
    since 1.3

    Exceptions

    \ArangoDBClient\Exception

    Returns

    array

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

    getServerStatisticsDescription(array $options = array()) : array

    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

    link This will throw if the statistics-description cannot be retrieved
    see
    since 1.3

    Parameters

    $options

    array
    • 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.
  • Exceptions

    \ArangoDBClient\Exception

    Returns

    array

    Get the server time

    getServerTime() : double

    This will throw if the time cannot be retrieved

    since 1.2

    Exceptions

    \ArangoDBClient\Exception

    Returns

    double- a double holding the timestamp

    Get the server version

    getServerVersion(boolean $details = false) : string

    This will throw if the version cannot be retrieved

    since 1.2

    Parameters

    $details

    boolean
    • True to get a more detailed response

    Exceptions

    \ArangoDBClient\Exception

    Returns

    string- a string holding the ArangoDB version

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

    reloadServerRouting() : boolean

    This will throw if the routing cannot be reloaded

    since 1.2

    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

     Constants

     

    details for server version

    OPTION_DETAILS = 'details'