Widget for adding / editing database connections

package OpenSQLManager
subpackage Widgets

 Methods

No params = add, params = edit

__construct(object $db) : void

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 : \GtkEntry

 

Connection database name

$conn_db : \GtkEntry

 

Connection database file

$db_file : \GtkFileChooserButton

 

Connection database type

$dbtype : \GtkComboBox

 

Connection database host

$host : \GtkEntry

 

Label for connection name

$lblconn : \GtkLabel

 

Label for connection database name

$lblconn_db : \Gtklabel

 

Label for database file

$lbldb_file : \GtkLabel

 

Label for database type

$lbldbtype : \Gtklabel

 

Label for database host

$lblhost : \Gtklabel

 

Label for database connection password

$lblpass : \GtkLabel

 

Label for database connection port

$lblport : \GtkLabel

 

Label for database connection user

$lbluser : \GtkLabel

 

Reference to last connection name

$old_conn : string

 

Connection password

$pass : \GtkEntry

 

Connection port

$port : \GtkEntry

 

Connection user name

$user : \GtkEntry

 

Alias to Settings::get_instance

$settings : \Settings