\triagens\ArangoDbEndpoint

Endpoint specification

An endpoint contains the server location the client connects to the following endpoint types are currently supported (more to be added later):

  • tcp://host:port for tcp connections
  • unix://socket for UNIX sockets (provided the server supports this)
  • ssl://host:port for SSL connections (provided the server supports this)

Note: SSL support is added in ArangoDB server 1.1


Summary

Methods
Properties
Constants
__construct()
__toString()
getType()
getHost()
isValid()
create()
modify()
delete()
listEndpoints()
No public properties found
TYPE_TCP
TYPE_SSL
TYPE_UNIX
REGEXP_TCP
REGEXP_SSL
REGEXP_UNIX
ENTRY_ENDPOINT
ENTRY_DATABASES
No protected methods found
No protected properties found
N/A
No private methods found
$_value
N/A

Constants

TYPE_TCP

TYPE_TCP

TCP endpoint type

TYPE_SSL

TYPE_SSL

SSL endpoint type

TYPE_UNIX

TYPE_UNIX

UNIX socket endpoint type

REGEXP_TCP

REGEXP_TCP

Regexp for TCP endpoints

REGEXP_SSL

REGEXP_SSL

Regexp for SSL endpoints

REGEXP_UNIX

REGEXP_UNIX

Regexp for UNIX socket endpoints

ENTRY_ENDPOINT

ENTRY_ENDPOINT

Endpoint index

ENTRY_DATABASES

ENTRY_DATABASES

Databases index

Properties

$_value

$_value : string

Current endpoint value

Type

string

Methods

__construct()

__construct(string $value) : \triagens\ArangoDb\Endpoint

Create a new endpoint

Parameters

string $value
  • endpoint specification

Throws

\triagens\ArangoDb\ClientException

Returns

\triagens\ArangoDb\Endpoint

__toString()

__toString() : string

Return a string representation of the endpoint

Returns

string —
  • string representation of the endpoint

getType()

getType(string $value) : string

Return the type of an endpoint

Parameters

string $value
  • endpoint specification value

Returns

string —
  • endpoint type

getHost()

getHost(string $value) : string

Return the host name of an endpoint

Parameters

string $value
  • endpoint specification value

Returns

string —
  • host name

isValid()

isValid(string $value) : boolean

check whether an endpoint specification is valid

Parameters

string $value
  • endpoint specification value

Returns

boolean —
  • true if endpoint specification is valid, false otherwise

create()

create(\triagens\ArangoDb\Connection $connection, string $endpoint, array $databases) : array

creates an endpoint

This creates a new endpoint
This is an alias function to Endpoint::modify, as ArangoDB's API has one call to support both new and modify

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used
string $endpoint
  • the endpoint specification, e.g. tcp://127.0.0.1:8530
array $databases
  • a list of database names the endpoint is responsible for.
                          *

Returns

array —

$responseArray - The response array.

modify()

modify(\triagens\ArangoDb\Connection $connection, string $endpoint, array $databases) : array

modifies an endpoint

This will modify an existing or create a new endpoint.

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used
string $endpoint
  • the endpoint specification, e.g. tcp://127.0.0.1:8530
array $databases
  • a list of database names the endpoint is responsible for.

Returns

array —

$responseArray - The response array.

delete()

delete(\triagens\ArangoDb\Connection $connection, string $endpoint) : array

Deletes an endpoint

This will delete an existing endpoint.

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used
string $endpoint
  • the endpoint specification, e.g. tcp://127.0.0.1:8530

Returns

array —

$responseArray - The response array.

listEndpoints()

listEndpoints(\triagens\ArangoDb\Connection $connection) : array

List endpoints

This will list the endpoints that are configured on the server

Parameters

\triagens\ArangoDb\Connection $connection
  • the connection to be used

Returns

array —

$responseArray - The response array.