Arango PHP ODM

DatabaseHandler extends ManagesConnection
in package

AbstractYes

Manages databases on Arango server

Tags
author

Lucas S. Vieira

Table of Contents

Methods

create()  : bool
Creates a new database on server
current()  : array<string|int, mixed>
Returns information about the current database
drop()  : bool
Drops a database from server
getConnection()  : Connection
Return the connection object
list()  : ArrayList
Lists databases that exists on server
setConnection()  : void
Sets a connection for class.
userDatabases()  : ArrayList
Lists the databases that current user has access

Methods

create()

Creates a new database on server

public static create(Connection $connection, string $database) : bool
Parameters
$connection : Connection

Connection object to be used

$database : string

Database name

Tags
throws
GuzzleException|DatabaseException
Return values
bool

True if database was successfully created on server. Throw an exception otherwise.

drop()

Drops a database from server

public static drop(Connection $connection, string $database) : bool
Parameters
$connection : Connection

Connection object to be used

$database : string

Database name

Tags
throws
DatabaseException|GuzzleException
Return values
bool

True if database was successfully dropped on server. Throw an exception otherwise.


        
On this page

Search results