public
|
#
__construct( array $options )
Set up the connection object, validate the options provided
Set up the connection object, validate the options provided
Parameters
- $options
- initial connection options
Throws
|
public
|
#
__destruct( )
Close existing connection handle if a keep-alive connection was used
Close existing connection handle if a keep-alive connection was used
|
public
|
#
setOption( string $name, string $value )
Set an option set for the connection
Set an option set for the connection
Parameters
Throws
|
public
triagens\ArangoDb\ConnectionOptions
|
#
getOptions( )
Get the options set for the connection
Get the options set for the connection
Returns
|
public
mixed
|
#
getOption( string $name )
Get an option set for the connection
Get an option set for the connection
Parameters
Returns
mixed
Throws
|
public
triagens\ArangoDb\HttpResponse
|
#
get( string $url, array $customHeaders = [] )
Issue an HTTP GET request
Issue an HTTP GET request
Parameters
Returns
Throws
|
public
triagens\ArangoDb\HttpResponse
|
#
post( string $url, string $data, array $customHeaders = [] )
Issue an HTTP POST request with the data provided
Issue an HTTP POST request with the data provided
Parameters
- $url
- $data
- $customHeaders
Returns
Throws
|
public
triagens\ArangoDb\HttpResponse
|
#
put( string $url, string $data, array $customHeaders = [] )
Issue an HTTP PUT request with the data provided
Issue an HTTP PUT request with the data provided
Parameters
- $url
- $data
- $customHeaders
Returns
Throws
|
public
triagens\ArangoDb\HttpResponse
|
#
head( string $url, array $customHeaders = [] )
Issue an HTTP Head request with the data provided
Issue an HTTP Head request with the data provided
Parameters
Returns
Throws
|
public
triagens\ArangoDb\HttpResponse
|
#
patch( string $url, string $data, array $customHeaders = [] )
Issue an HTTP PATCH request with the data provided
Issue an HTTP PATCH request with the data provided
Parameters
- $url
- $data
- $customHeaders
Returns
Throws
|
public
triagens\ArangoDb\HttpResponse
|
#
delete( string $url, array $customHeaders = [] )
Issue an HTTP DELETE request with the data provided
Issue an HTTP DELETE request with the data provided
Parameters
Returns
Throws
|
public
triagens\ArangoDb\HttpResponse
|
#
parseResponse( triagens\ArangoDb\HttpResponse $response )
Parse the response return the body values as an assoc array
Parse the response return the body values as an assoc array
Parameters
- $response
- the response as supplied by the server
Returns
Throws
|
public
triagens\ArangoDb\Batch
|
|
public
triagens\ArangoDb\Batch
|
#
setActiveBatch( triagens\ArangoDb\Batch $batch )
Sets the active Batch for this connection
Sets the active Batch for this connection
Parameters
- $batch
- Sets the given batch as active
Returns
|
public
triagens\ArangoDb\Batch
|
|
public
|
#
setCaptureBatch( boolean $state )
Sets the batch capture state (true, if capturing)
Sets the batch capture state (true, if capturing)
Parameters
- $state
- true to turn on capture batch mode, false to turn it off
|
public
|
#
setBatchRequest( boolean $state )
Sets connection into Batch-request mode. This is needed for some operations to act differently when in this mode.
Sets connection into Batch-request mode. This is needed for some operations to act differently when in this mode.
Parameters
- $state
- sets the connection state to batch request, meaning it is currently doing a batch request.
|
public
boolean
|
#
isInBatchCaptureMode( )
Returns true if this connection is in Batch-Capture mode
Returns true if this connection is in Batch-Capture mode
Returns
boolean
|
public
|
|
public static
boolean
|
#
detect_utf( array $string )
This function checks that the encoding of a string is utf.
It only checks for printable characters.
This function checks that the encoding of a string is utf.
It only checks for printable characters.
Parameters
- $string
- the data to check
Returns
boolean true if string is UTF-8, false if not
|
public static
|
#
check_encoding( array $data )
This function checks that the encoding of the keys and
values of the array are utf-8, recursively.
It will raise an exception if it encounters wrong encoded strings.
This function checks that the encoding of the keys and
values of the array are utf-8, recursively.
It will raise an exception if it encounters wrong encoded strings.
Parameters
Throws
|
public
string
|
#
json_encode_wrapper( mixed $data, mixed $options = null )
This is a json_encode() wrapper that also checks if the data is utf-8 conform.
internally it calls the check_encoding() method. If that method does not throw
an Exception, this method will happily return the json_encoded data.
This is a json_encode() wrapper that also checks if the data is utf-8 conform.
internally it calls the check_encoding() method. If that method does not throw
an Exception, this method will happily return the json_encoded data.
Parameters
- $data
- the data to encode
- $options
- the options for the json_encode() call
Returns
string the result of the json_encode
Throws
|
public
|
#
setDatabase( string $database )
Set the database to use with this connection
Set the database to use with this connection
Sets the database to use with this connection, for example: 'my_database'
Further calls to the database will be addressed to the given database.
Parameters
- $database
- the database to use
|
public
string
|
#
getDatabase( )
Get the database that is currently used with this connection
Get the database that is currently used with this connection
Get the database to use with this connection, for example: 'my_database'
Returns
string
|