Static Public Attributes |
static | $configSet = false |
Detailed Description
Database connection class
Definition at line 10 of file oxdb.php.
Member Function Documentation
static oxDb::_getConfigParam |
( |
|
$sConfigName | ) |
|
|
staticprotected |
Return local config value by given name.
- Parameters
-
string | $sConfigName | returning config name. |
- Returns
- mixed
Definition at line 187 of file oxdb.php.
oxDb::_getConnectionId |
( |
| ) |
|
|
protected |
Get connection ID
- Returns
- link identifier
Definition at line 555 of file oxdb.php.
oxDb::_getDbInstance |
( |
|
$iInstType = false | ) |
|
|
protected |
Returns database instance object for given type
- Parameters
-
int | $iInstType | instance type |
- Returns
- ADONewConnection
Definition at line 404 of file oxdb.php.
Returns adodb modules string
- Returns
- string
Definition at line 236 of file oxdb.php.
oxDb::_notifyConnectionErrors |
( |
|
$oDb | ) |
|
|
protected |
Notifying shop owner about connection problems
- Parameters
-
ADOConnection | $oDb | database connection instance |
Definition at line 332 of file oxdb.php.
oxDb::_onConnectionError |
( |
|
$oDb | ) |
|
|
protected |
In case of connection error - redirects to setup or send notification message for shop owner
- Parameters
-
ADOConnection | $oDb | database connection instance |
Definition at line 371 of file oxdb.php.
oxDb::_registerAdoDbExceptionHandler |
( |
| ) |
|
|
protected |
Registers AdoDb exceptions handler for SQL errors
Definition at line 258 of file oxdb.php.
oxDb::_sendMail |
( |
|
$sEmail, |
|
|
|
$sSubject, |
|
|
|
$sBody |
|
) |
| |
|
protected |
Returns $oMailer instance
- Parameters
-
string | $sEmail | email address |
string | $sSubject | subject |
string | $sBody | email body |
- Returns
- phpmailer
Definition at line 312 of file oxdb.php.
Setting up connection parameters - sql mode, encoding, logging etc
- Parameters
-
ADOConnection | $oDb | database connection instance |
Definition at line 271 of file oxdb.php.
oxDb::escapeString |
( |
|
$sString | ) |
|
Escape string for using in mysql statements
- Parameters
-
string | $sString | string which will be escaped |
- Deprecated:
- since v5.3.0 (2016-06-06); This method will be removed in v6.0. Use oxLegacyDb::quote() to quote values. As of v6.0 there will be a new method quoteIdentifier() to quote strings in order to use them as identifiers.
- Returns
- string
Definition at line 570 of file oxdb.php.
Returns database object
- Parameters
-
int | $iFetchMode | - fetch mode default numeric - 0 |
- Exceptions
-
- Returns
- oxLegacyDb
Definition at line 435 of file oxdb.php.
static oxDb::getInstance |
( |
| ) |
|
|
static |
Returns Singleton instance
- Returns
- oxdb
Definition at line 201 of file oxdb.php.
oxDb::getTableDescription |
( |
|
$sTableName | ) |
|
Extracts and returns table metadata from DB.
- Parameters
-
string | $sTableName | Name of table to invest. |
- Returns
- array
Definition at line 521 of file oxdb.php.
Cal function is admin from oxFunction. Need to mock in tests.
- Returns
- bool
Definition at line 226 of file oxdb.php.
oxDb::isValidFieldName |
( |
|
$sField | ) |
|
Checks if given string is valid database field name. It must contain from alphanumeric plus dot and underscore symbols
- Parameters
-
- Deprecated:
- since v5.3.0 (2016-06-06); This method will be removed in v6.0.
- Returns
- bool
Definition at line 545 of file oxdb.php.
oxDb::quoteArray |
( |
|
$aStrArray | ) |
|
oxDb::resetTblDescCache |
( |
| ) |
|
Call to reset table description cache
- Deprecated:
- since v5.3.0 (2016-06-06); This method will be removed in v6.0.
Definition at line 509 of file oxdb.php.
static oxDb::setConfig |
( |
|
$oConfig | ) |
|
|
static |
Sets configs object with method getVar() and properties needed for successful connection.
- Parameters
-
Definition at line 160 of file oxdb.php.
Member Data Documentation
oxDb::$_aTblDescCache = array() |
|
staticprotected |
oxDb::$_blLogChangesInAdmin = false |
|
staticprivate |
oxDb::$_iMasterSlaveBalance |
|
staticprivate |
oxDb::$_sDefaultDatabaseConnection = null |
|
staticprivate |
const oxDb::FETCH_MODE_ASSOC = ADODB_FETCH_ASSOC |
const oxDb::FETCH_MODE_NUM = ADODB_FETCH_NUM |
The documentation for this class was generated from the following file: