Arango PHP ODM

Connection extends Authenticable
in package

Represents a connection with an ArangoDB database.

Tags
author

Lucas S. Vieira

Table of Contents

Methods

__construct()  : mixed
Connection constructor.
__debugInfo()  : array<string|int, mixed>
Proper debug dump for connection objects.
customHttpRequest()  : ResponseInterface
Makes a custom HTTP request.
delete()  : ResponseInterface
Executes a DELETE request on server.
get()  : ResponseInterface
Executes a GET request on server.
getBaseUri()  : string
Return the base endpoint URI.
getDatabase()  : Database
Return the database object for this connection
getDatabaseName()  : string
Return the name of database handled
getDefaultHeaders()  : array<string|int, mixed>
Return the connection default headers.
getUsername()  : string
Returns the name of user on server
isAuthenticated()  : bool
If connection is authenticated.
patch()  : ResponseInterface
Executes a PATCH request on server.
post()  : ResponseInterface
Executes a POST request on server.
put()  : ResponseInterface
Executes a PUT request on server.
setDefaultHeaders()  : mixed
Set the connection default headers.

Methods

__debugInfo()

Proper debug dump for connection objects.

public __debugInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

customHttpRequest()

Makes a custom HTTP request.

public customHttpRequest(string $method, string $uri[, string $body = "" ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$method : string

HTTP Method to use.

$uri : string

URI to make the request.

$body : string = ""

The body content.

$headers : array<string|int, mixed> = []

Additional headers to send on request.

Tags
throws
GuzzleException
Return values
ResponseInterface

delete()

Executes a DELETE request on server.

public delete(string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$endpoint : string

URI to make the request.

$body : array<string|int, mixed> = []

The body content.

$headers : array<string|int, mixed> = []

Additional headers to send on request.

Tags
throws
GuzzleException
Return values
ResponseInterface

get()

Executes a GET request on server.

public get(string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$endpoint : string

URI to make the request.

$body : array<string|int, mixed> = []

The body content.

$headers : array<string|int, mixed> = []

Additional headers to send on request.

Tags
throws
GuzzleException
Return values
ResponseInterface

getBaseUri()

Return the base endpoint URI.

public getBaseUri() : string
Return values
string

getDatabaseName()

Return the name of database handled

public getDatabaseName() : string
Return values
string

getDefaultHeaders()

Return the connection default headers.

public getDefaultHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUsername()

Returns the name of user on server

public getUsername() : string
Return values
string

isAuthenticated()

If connection is authenticated.

public isAuthenticated() : bool
Return values
bool

True if connection already authenticate, false otherwise.

patch()

Executes a PATCH request on server.

public patch(string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$endpoint : string

URI to make the request.

$body : array<string|int, mixed> = []

The body content.

$headers : array<string|int, mixed> = []

Additional headers to send on request.

Tags
throws
GuzzleException
Return values
ResponseInterface

post()

Executes a POST request on server.

public post(string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$endpoint : string

URI to make the request.

$body : array<string|int, mixed> = []

The body content.

$headers : array<string|int, mixed> = []

Additional headers to send on request.

Tags
throws
GuzzleException
Return values
ResponseInterface

put()

Executes a PUT request on server.

public put(string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : ResponseInterface
Parameters
$endpoint : string

URI to make the request.

$body : array<string|int, mixed> = []

The body content.

$headers : array<string|int, mixed> = []

Additional headers to send on request.

Tags
throws
GuzzleException
Return values
ResponseInterface

setDefaultHeaders()

Set the connection default headers.

public setDefaultHeaders(array<string|int, mixed> $headers) : mixed
Parameters
$headers : array<string|int, mixed>

The default array to add on all requests.


        
On this page

Search results