Public Member Functions | |
getMultiLangFieldName ($sField) | |
isQuoteNeeded ($sFieldtype) | |
getTableDescription ($sTableName) | |
convertDBDateTime ($oObject, $blToTimeStamp=false, $blOnlyDate=false) | |
convertDBTimestamp ($oObject, $blToTimeStamp=false) | |
convertDBDate ($oObject, $blToTimeStamp=false) | |
createSQLList ($aArray) | |
isValidFieldName ($sField) | |
Static Public Member Functions | |
static | getInstance () |
static | getDb ($blAssoc=false) |
static | startTransaction () |
static | commitTransaction () |
static | rollbackTransaction () |
static | setTransactionIsolationLevel ($sLevel=null) |
Protected Member Functions | |
_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) | |
Static Protected Attributes | |
static | $_aTblDescCache = array() |
Static Private Attributes | |
static | $_instance = null |
static | $_oDB = null |
static oxDb.getInstance | ( | ) | [static] |
Returns Singelton instance
static oxDb.getDb | ( | $ | blAssoc = false |
) | [static] |
Returns database object
boolean | $blAssoc default false |
oxConnectionException | error while initiating connection to DB |
oxDb.getMultiLangFieldName | ( | $ | sField | ) |
Returns database field name with _ Language ID if needed
string | $sField the field name |
oxDb.isQuoteNeeded | ( | $ | sFieldtype | ) |
Checks if field, according to field type, must be surrounded with quote symbols. Returns true if yes.
string | $sFieldtype Type of field |
oxDb.getTableDescription | ( | $ | sTableName | ) |
Extracts and returns table metadata from DB.
string | $sTableName Name of table to invest. |
Bidirectional converter for date/datetime field
object | $oObject data field object | |
bool | $blToTimeStamp set TRUE to format MySQL compatible value | |
bool | $blOnlyDate set TRUE to format "date" type field |
oxDb.convertDBTimestamp | ( | $ | oObject, | |
$ | blToTimeStamp = false | |||
) |
Bidirectional converter for timestamp field
object | $oObject oxField type object that keeps db field info | |
bool | $blToTimeStamp if true - converts value to database compatible timestamp value |
oxDb.convertDBDate | ( | $ | oObject, | |
$ | blToTimeStamp = false | |||
) |
Bidirectional converter for date field
object | $oObject oxField type object that keeps db field info | |
bool | $blToTimeStamp if true - converts value to database compatible timestamp value |
oxDb.createSQLList | ( | $ | aArray | ) |
Takes Array and creates IN() list for SQL statement
array | $aArray array of string to join |
static oxDb.startTransaction | ( | ) | [static] |
Start mysql transaction
static oxDb.commitTransaction | ( | ) | [static] |
Commit mysql transaction
static oxDb.rollbackTransaction | ( | ) | [static] |
RollBack mysql transaction
static oxDb.setTransactionIsolationLevel | ( | $ | sLevel = null |
) | [static] |
Set transaction isolation level Allowed values READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE
oxDb.isValidFieldName | ( | $ | sField | ) |
Checks if given string is valid database field name. It must contain from alphanumeric plus dot and underscore symbols
string | $sField field name |
oxDb._setDefaultFormatedValue | ( | $ | oObject, | |
$ | sDate, | |||
$ | sLocalDateFormat, | |||
$ | sLocalTimeFormat, | |||
$ | blOnlyDate | |||
) | [protected] |
sets default formatted value
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) |
oxDb._defineAndCheckDefaultTimeValues | ( | $ | blToTimeStamp | ) | [protected] |
defines and checks dafault time values
bool | $blToTimeStamp - |
oxDb._defineAndCheckDefaultDateValues | ( | $ | blToTimeStamp | ) | [protected] |
defines and checks default date values
bool | $blToTimeStamp marker how to format |
oxDb._defaultDatePattern | ( | ) | [protected] |
sets default date pattern
oxDb._defaultTimePattern | ( | ) | [protected] |
sets default time pattern
oxDb._regexp2ValidateDateInput | ( | ) | [protected] |
regular expressions to validate date input
oxDb._regexp2ValidateTimeInput | ( | ) | [protected] |
regular expressions to validate time input
oxDb._defineDateFormattingRules | ( | ) | [protected] |
define date formatting rules
oxDb._defineTimeFormattingRules | ( | ) | [protected] |
defines time formatting rules
oxDb._setDefaultDateTimeValue | ( | $ | oObject, | |
$ | sLocalDateFormat, | |||
$ | sLocalTimeFormat, | |||
$ | blOnlyDate | |||
) | [protected] |
Sets default date time value
object | $oObject date field object | |
string | $sLocalDateFormat input format | |
string | $sLocalTimeFormat local format | |
bool | $blOnlyDate marker to format only date field (no time) |
oxDb._setDate | ( | $ | oObject, | |
$ | sDateFormat, | |||
$ | aDFields, | |||
$ | aDateMatches | |||
) | [protected] |
sets date
object | $oObject date field object | |
string | $sDateFormat date format | |
array | $aDFields days | |
array | $aDateMatches new date as array (month, year) |
oxDb._formatCorrectTimeValue | ( | $ | oObject, | |
$ | sDateFormat, | |||
$ | sTimeFormat, | |||
$ | aDateMatches, | |||
$ | aTimeMatches, | |||
$ | aTFields, | |||
$ | aDFields | |||
) | [protected] |
Formatting correct time value
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 |
oxDb.$_instance = null [static, private] |
oxDb.$_oDB = null [static, private] |
oxDb.$_aTblDescCache = array() [static, protected] |