List of all members.
Public Member Functions |
| getMultiLangFieldName ($sField) |
| isQuoteNeeded ($sFieldtype) |
| quoteArray ($aStrArray) |
| resetTblDescCache () |
| getTableDescription ($sTableName) |
| convertDBDateTime ($oObject, $blToTimeStamp=false, $blOnlyDate=false) |
| convertDBTimestamp ($oObject, $blToTimeStamp=false) |
| convertDBDate ($oObject, $blToTimeStamp=false) |
| createSQLList ($aArray) |
| isValidFieldName ($sField) |
| escapeString ($sString) |
| updateViews ($aTables=null) |
Static Public Member Functions |
static | getInstance () |
static | getDb ($iFetchMode=oxDb::FETCH_MODE_NUM) |
static | startTransaction () |
static | commitTransaction () |
static | rollbackTransaction () |
static | setTransactionIsolationLevel ($sLevel=null) |
Public Attributes |
const | FETCH_MODE_NUM = ADODB_FETCH_NUM |
const | FETCH_MODE_ASSOC = ADODB_FETCH_ASSOC |
Protected Member Functions |
| _getModules () |
| _setUp ($oDb) |
| _sendMail ($sEmail, $sSubject, $sBody) |
| _notifyConnectionErrors ($oDb) |
| _onConnectionError ($oDb) |
| _getDbInstance ($iInstType=false) |
| _setDefaultFormatedValue ($oObject, $sDate, $sLocalDateFormat, $sLocalTimeFormat, $blOnlyDate) |
| _defineAndCheckDefaultTimeValues ($blToTimeStamp) |
| _defineAndCheckDefaultDateValues ($blToTimeStamp) |
| _defaultDatePattern () |
| _defaultTimePattern () |
| _regexp2ValidateDateInput () |
| _regexp2ValidateTimeInput () |
| _defineDateFormattingRules () |
| _defineTimeFormattingRules () |
| _setDefaultDateTimeValue ($oObject, $sLocalDateFormat, $sLocalTimeFormat, $blOnlyDate) |
| _setDate ($oObject, $sDateFormat, $aDFields, $aDateMatches) |
| _formatCorrectTimeValue ($oObject, $sDateFormat, $sTimeFormat, $aDateMatches, $aTimeMatches, $aTFields, $aDFields) |
| _getConnectionId () |
Static Protected Attributes |
static | $_instance = null |
static | $_oDB = null |
static | $_aTblDescCache = array() |
Detailed Description
Database connection class
Definition at line 10 of file oxdb.php.
Member Function Documentation
oxDb._defaultDatePattern |
( |
|
) |
[protected] |
sets default date pattern
- Returns:
- array
Definition at line 753 of file oxdb.php.
oxDb._defaultTimePattern |
( |
|
) |
[protected] |
sets default time pattern
- Returns:
- array
Definition at line 768 of file oxdb.php.
oxDb._defineAndCheckDefaultDateValues |
( |
$ |
blToTimeStamp |
) |
[protected] |
defines and checks default date values
- Parameters:
-
| bool | $blToTimeStamp marker how to format |
- Returns:
- string
Definition at line 737 of file oxdb.php.
oxDb._defineAndCheckDefaultTimeValues |
( |
$ |
blToTimeStamp |
) |
[protected] |
defines and checks dafault time values
- Parameters:
-
- Returns:
- string
Definition at line 719 of file oxdb.php.
oxDb._defineDateFormattingRules |
( |
|
) |
[protected] |
define date formatting rules
- Returns:
- array
Definition at line 813 of file oxdb.php.
oxDb._defineTimeFormattingRules |
( |
|
) |
[protected] |
defines time formatting rules
- Returns:
- array
Definition at line 828 of file oxdb.php.
oxDb._formatCorrectTimeValue |
( |
$ |
oObject, |
|
|
$ |
sDateFormat, |
|
|
$ |
sTimeFormat, |
|
|
$ |
aDateMatches, |
|
|
$ |
aTimeMatches, |
|
|
$ |
aTFields, |
|
|
$ |
aDFields | |
|
) |
| | [protected] |
Formatting correct time value
- Parameters:
-
| object | $oObject data field object |
| string | $sDateFormat date format |
| string | $sTimeFormat time format |
| array | $aDateMatches new new date |
| array | $aTimeMatches new time |
| array | $aTFields defines the time fields |
| array | $aDFields defines the date fields |
- Returns:
- null
Definition at line 906 of file oxdb.php.
oxDb._getConnectionId |
( |
|
) |
[protected] |
Get connection ID
- Returns:
- link identifier
Definition at line 931 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 228 of file oxdb.php.
oxDb._getModules |
( |
|
) |
[protected] |
Returns adodb modules string
- Returns:
- string
Definition at line 75 of file oxdb.php.
oxDb._notifyConnectionErrors |
( |
$ |
oDb |
) |
[protected] |
Notifying shop owner about connection problems
- Parameters:
-
| ADOConnection | $oDb database connection instance |
- Returns:
- null
Definition at line 162 of file oxdb.php.
oxDb._onConnectionError |
( |
$ |
oDb |
) |
[protected] |
In case of connection is errorous - redirects to setup or send notification message for shop owner
- Parameters:
-
| ADOConnection | $oDb database connection instance |
- Returns:
- null
Definition at line 204 of file oxdb.php.
oxDb._regexp2ValidateDateInput |
( |
|
) |
[protected] |
regular expressions to validate date input
- Returns:
- array
Definition at line 783 of file oxdb.php.
oxDb._regexp2ValidateTimeInput |
( |
|
) |
[protected] |
regular expressions to validate time input
- Returns:
- array
Definition at line 798 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 142 of file oxdb.php.
oxDb._setDate |
( |
$ |
oObject, |
|
|
$ |
sDateFormat, |
|
|
$ |
aDFields, |
|
|
$ |
aDateMatches | |
|
) |
| | [protected] |
sets date
- Parameters:
-
| object | $oObject date field object |
| string | $sDateFormat date format |
| array | $aDFields days |
| array | $aDateMatches new date as array (month, year) |
- Returns:
- null
Definition at line 877 of file oxdb.php.
oxDb._setDefaultDateTimeValue |
( |
$ |
oObject, |
|
|
$ |
sLocalDateFormat, |
|
|
$ |
sLocalTimeFormat, |
|
|
$ |
blOnlyDate | |
|
) |
| | [protected] |
Sets default date time value
- Parameters:
-
| object | $oObject date field object |
| string | $sLocalDateFormat input format |
| string | $sLocalTimeFormat local format |
| bool | $blOnlyDate marker to format only date field (no time) |
- Returns:
- null
Definition at line 848 of file oxdb.php.
oxDb._setDefaultFormatedValue |
( |
$ |
oObject, |
|
|
$ |
sDate, |
|
|
$ |
sLocalDateFormat, |
|
|
$ |
sLocalTimeFormat, |
|
|
$ |
blOnlyDate | |
|
) |
| | [protected] |
sets default formatted value
- Parameters:
-
| object | $oObject date field object |
| string | $sDate prefered date |
| string | $sLocalDateFormat input format |
| string | $sLocalTimeFormat local format |
| bool | $blOnlyDate marker to format only date field (no time) |
- Returns:
- null
Definition at line 683 of file oxdb.php.
oxDb._setUp |
( |
$ |
oDb |
) |
[protected] |
Setting up connection parameters - sql mode, encoding, logging etc
- Parameters:
-
| ADOConnection | $oDb database connection instance |
- Returns:
- null
Definition at line 103 of file oxdb.php.
static oxDb.commitTransaction |
( |
|
) |
[static] |
Commit mysql transaction
- Deprecated:
- in v4.6 2012-04-10; use oxlegacydb.commitTransaction();
- Returns:
- null
Definition at line 623 of file oxdb.php.
oxDb.convertDBDate |
( |
$ |
oObject, |
|
|
$ |
blToTimeStamp = false | |
|
) |
| | |
Bidirectional converter for date field
- Parameters:
-
| object | $oObject oxField type object that keeps db field info |
| bool | $blToTimeStamp if true - converts value to database compatible timestamp value |
- Returns:
- string
Definition at line 572 of file oxdb.php.
oxDb.convertDBDateTime |
( |
$ |
oObject, |
|
|
$ |
blToTimeStamp = false , |
|
|
$ |
blOnlyDate = false | |
|
) |
| | |
Bidirectional converter for date/datetime field
- Parameters:
-
| object | $oObject data field object |
| bool | $blToTimeStamp set TRUE to format MySQL compatible value |
| bool | $blOnlyDate set TRUE to format "date" type field |
- Returns:
- string
Definition at line 402 of file oxdb.php.
oxDb.convertDBTimestamp |
( |
$ |
oObject, |
|
|
$ |
blToTimeStamp = false | |
|
) |
| | |
Bidirectional converter for timestamp field
- Parameters:
-
| object | $oObject oxField type object that keeps db field info |
| bool | $blToTimeStamp if true - converts value to database compatible timestamp value |
- Returns:
- string
Definition at line 522 of file oxdb.php.
oxDb.createSQLList |
( |
$ |
aArray |
) |
|
Takes Array and creates IN() list for SQL statement
- Parameters:
-
| array | $aArray array of string to join |
- Deprecated:
- in v4.6 2012-03-30; no where used;
- Returns:
- string
Definition at line 586 of file oxdb.php.
oxDb.escapeString |
( |
$ |
sString |
) |
|
Escape string for using in mysql statements
- Parameters:
-
| string | $sString string which will be escaped |
- Returns:
- string
Definition at line 943 of file oxdb.php.
Returns database object
- Parameters:
-
| boolean | $iFetchMode - fetche mode default numeric - 0 |
- Exceptions:
-
- Returns:
- ADOConnection
Definition at line 260 of file oxdb.php.
static oxDb.getInstance |
( |
|
) |
[static] |
Returns Singelton instance
- Returns:
- oxdb
Definition at line 51 of file oxdb.php.
oxDb.getMultiLangFieldName |
( |
$ |
sField |
) |
|
Returns database field name with _ Language ID if needed
- Parameters:
-
| string | $sField the field name |
- Deprecated:
- in v4.6 2012-03-30; no where used;
- Returns:
- string
Definition at line 324 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 379 of file oxdb.php.
oxDb.isQuoteNeeded |
( |
$ |
sFieldtype |
) |
|
Checks if field, according to field type, must be surrounded with quote symbols. Returns true if yes.
- Parameters:
-
| string | $sFieldtype Type of field |
- Deprecated:
- in v4.6 2012-03-30; no where used;
- Returns:
- bool
Definition at line 339 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:
-
| string | $sField field name |
- Returns:
- bool
Definition at line 667 of file oxdb.php.
oxDb.quoteArray |
( |
$ |
aStrArray |
) |
|
Quotes an array.
- Parameters:
-
| array | $aStrArray array of strings to quote |
- Returns:
- array
Definition at line 352 of file oxdb.php.
oxDb.resetTblDescCache |
( |
|
) |
|
Call to reset table description cache
- Returns:
- null
Definition at line 367 of file oxdb.php.
static oxDb.rollbackTransaction |
( |
|
) |
[static] |
RollBack mysql transaction
- Deprecated:
- in v4.6 2012-04-10; use oxlegacydb.rollbackTransaction();
- Returns:
- null
Definition at line 635 of file oxdb.php.
static oxDb.setTransactionIsolationLevel |
( |
$ |
sLevel = null |
) |
[static] |
Set transaction isolation level Allowed values READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE
- Parameters:
-
- Deprecated:
- in v4.6 2012-04-10; use oxlegacydb.setTransactionIsolationLevel()
- Returns:
- null
Definition at line 650 of file oxdb.php.
static oxDb.startTransaction |
( |
|
) |
[static] |
Start mysql transaction
- Deprecated:
- in v4.6 2012-04-10; use oxlegacydb.startTransaction();
- Returns:
- null
Definition at line 611 of file oxdb.php.
oxDb.updateViews |
( |
$ |
aTables = null |
) |
|
Updates shop views
- Parameters:
-
| array | $aTables If you need to update specific tables, just pass its names as array [optional] |
- Returns:
- null
Definition at line 962 of file oxdb.php.
Member Data Documentation
oxDb.$_aTblDescCache = array() [static, protected] |
oxDb.$_instance = null [static, protected] |
oxDb.$_oDB = null [static, protected] |
The documentation for this class was generated from the following file: