Widget for adding / editing database connections

 Methods

No params = add, params = edit

__construct(object $db) 

Parameters

$db

object

Set defaults for new database type

change_db() : void

Adds the database to the settings file

db_add() : void

Edit an existing database connection

db_edit() : void

Checks what database drivers are available

get_available_dbs() : array

Returns

array

Like change_db function, but save current values

set_db() : void

Test a db connection, and display a popup with the result of the test

test_conn() : void

Simple helper function for adding a row to the GtkTable

_add_row(string $label, string $vname, int $y1, int $y2) : void

Parameters

$label

string

$vname

string

$y1

int

&$y1

$y2

int

&$y2

Table layout

_layout() : void

 Properties

 

Connection name

$conn 

 

Connection database name

$conn_db 

 

Connection database file

$db_file 

 

Connection database type

$dbtype 

 

Connection database host

$host 

 

Labels

$lblconn 

 

Labels

$lblconn_db 

 

Labels

$lbldatabase 

 

Labels

$lbldb_file 

 

Labels

$lbldbtype 

 

Labels

$lblhost 

 

Labels

$lblpass 

 

Labels

$lblport 

 

Labels

$lbluser 

 

Reference to last connection name

$old_conn 

 

Connection password

$pass 

 

Connection port

$port 

 

Connection user name

$user 

 

Alias to Settings::get_instance

$settings : \Settings