Public Member Functions | |
| connect () | |
| DBConnection () | |
| disconnect () | |
| & | getConn () |
| & | getDBConn () |
| & | getInstance ($setInstance=null) |
| getNumQueries () | |
| initConn () | |
| initCustomDBConnection ($driver, $host, $username, $password, $databaseName, $persistent=true, $connectionCharset=false, $connectOnInit=true, $debug=false, $forceNew=false) | |
| initDefaultDBConnection () | |
| isConnected () | |
| reconnect ($forceNew=false) | |
Public Attributes | |
| $dbconn | |
| $driver | |
Definition at line 19 of file DBConnection.inc.php.
| DBConnection.connect | ( | ) |
Establish connection to the database.
Definition at line 128 of file DBConnection.inc.php.
Referenced by initConn(), and reconnect().
| DBConnection.DBConnection | ( | ) |
Constructor. Calls initDefaultDBConnection if no arguments are passed, otherwise calls initCustomDBConnection with custom connection parameters.
Definition at line 49 of file DBConnection.inc.php.
References initDefaultDBConnection().
Referenced by getInstance().
| DBConnection.disconnect | ( | ) |
Disconnect from the database.
Definition at line 164 of file DBConnection.inc.php.
Referenced by reconnect().
| & DBConnection.getConn | ( | ) |
Return a reference to a single static instance of the database connection.
Definition at line 229 of file DBConnection.inc.php.
References getInstance().
Referenced by DAO.DAO(), dbXMLtoSQL.execute(), DBDataXMLParser.executeData(), and AdminFunctionsHandler.systemInfo().
| & DBConnection.getDBConn | ( | ) |
Return the database connection object.
Definition at line 188 of file DBConnection.inc.php.
| & DBConnection.getInstance | ( | $ | setInstance = null |
) |
Return a reference to a single static instance of the database connection manager.
| $setInstance | DBConnection |
Definition at line 213 of file DBConnection.inc.php.
References DBConnection().
Referenced by Install.createDatabase(), getConn(), ImportOJS1.import(), Installer.preInstall(), Install.preInstall(), and TemplateManager.smartyGetDebugInfo().
| DBConnection.getNumQueries | ( | ) |
Get number of database queries executed.
Definition at line 204 of file DBConnection.inc.php.
| DBConnection.initConn | ( | ) |
Initialize database connection object and establish connection to the database.
Definition at line 112 of file DBConnection.inc.php.
References connect().
Referenced by initCustomDBConnection(), and initDefaultDBConnection().
| DBConnection.initCustomDBConnection | ( | $ | driver, | |
| $ | host, | |||
| $ | username, | |||
| $ | password, | |||
| $ | databaseName, | |||
| $ | persistent = true, |
|||
| $ | connectionCharset = false, |
|||
| $ | connectOnInit = true, |
|||
| $ | debug = false, |
|||
| $ | forceNew = false | |||
| ) |
Create new database connection with the specified connection parameters.
| $driver | string | |
| $host | string | |
| $username | string | |
| $password | string | |
| $databaseName | string | |
| $persistent | boolean use persistent connections (default true) | |
| $connectionCharset | string character set to use for the connection (default none) | |
| $connectOnInit | boolean establish database connection on initiation (default true) | |
| $debug | boolean enable verbose debug output (default false) | |
| $forceNew | boolean force a new connection (default false) |
Definition at line 93 of file DBConnection.inc.php.
References $driver, and initConn().
| DBConnection.initDefaultDBConnection | ( | ) |
Create new database connection with the connection parameters from the system configuration.
Definition at line 64 of file DBConnection.inc.php.
References Config.getVar(), and initConn().
Referenced by DBConnection().
| DBConnection.isConnected | ( | ) |
Check if a database connection has been established.
Definition at line 196 of file DBConnection.inc.php.
| DBConnection.reconnect | ( | $ | forceNew = false |
) |
Reconnect to the database.
| $forceNew | boolean force a new connection |
Definition at line 175 of file DBConnection.inc.php.
References connect(), and disconnect().
| DBConnection.$dbconn |
The underlying database connection object
Definition at line 22 of file DBConnection.inc.php.
| DBConnection.$driver |
Database connection parameters
Definition at line 25 of file DBConnection.inc.php.
Referenced by initCustomDBConnection().
1.5.6