List of all members.
Public Member Functions | 
|   | quoteArray ($aStrArray) | 
|   | resetTblDescCache () | 
|   | getTableDescription ($sTableName) | 
|   | convertDBDateTime ($oObject, $blToTimeStamp=false, $blOnlyDate=false) | 
|   | convertDBTimestamp ($oObject, $blToTimeStamp=false) | 
|   | convertDBDate ($oObject, $blToTimeStamp=false) | 
|   | isValidFieldName ($sField) | 
|   | escapeString ($sString) | 
|   | updateViews ($aTables=null) | 
Static Public Member Functions | 
| static  | setConfig ($oConfig) | 
| static  | getInstance () | 
| static  | getDb ($iFetchMode=oxDb::FETCH_MODE_NUM) | 
Public Attributes | 
| const  | FETCH_MODE_NUM = ADODB_FETCH_NUM | 
| const  | FETCH_MODE_ASSOC = ADODB_FETCH_ASSOC | 
Static Public Attributes | 
| static  | $configSet = false | 
Protected Member Functions | 
|   | isAdmin () | 
|   | _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 Member Functions | 
| static  | _getConfigParam ($sConfigName) | 
Static Protected Attributes | 
| static  | $_instance = null | 
| static  | $_oDB = null | 
| static  | $_aTblDescCache = array() | 
Static Private Attributes | 
| static  | $_dbType = '' | 
| static  | $_dbUser = '' | 
| static  | $_dbPwd = '' | 
| static  | $_dbName = '' | 
| static  | $_dbHost = '' | 
| static  | $_iDebug = 0 | 
| static  | $_blLogChangesInAdmin = false | 
| static  | $_iUtfMode = 0 | 
| static  | $_sDefaultDatabaseConnection = null | 
| static  | $_aSlaveHosts | 
| static  | $_sAdminEmail | 
| static  | $_iMasterSlaveBalance | 
| static  | $_sLocalTimeFormat | 
| static  | $_sLocalDateFormat | 
Detailed Description
Database connection class 
Definition at line 10 of file oxdb.php.
Member Function Documentation
      
        
          | oxDb._defaultDatePattern  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
sets default date pattern
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 613 of file oxdb.php.
 
 
      
        
          | oxDb._defaultTimePattern  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
sets default time pattern
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 624 of file oxdb.php.
 
 
      
        
          | oxDb._defineAndCheckDefaultDateValues  | 
          ( | 
          $  | 
           blToTimeStamp | 
           )  | 
           [protected] | 
        
      
 
defines and checks default date values
- Parameters:
 - 
  
     | bool  | $blToTimeStamp marker how to format | 
  
   
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 602 of file oxdb.php.
 
 
      
        
          | oxDb._defineAndCheckDefaultTimeValues  | 
          ( | 
          $  | 
           blToTimeStamp | 
           )  | 
           [protected] | 
        
      
 
defines and checks default time values
- Parameters:
 - 
  
  
 
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 589 of file oxdb.php.
 
 
      
        
          | oxDb._defineDateFormattingRules  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
define date formatting rules
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - array 
 
Definition at line 657 of file oxdb.php.
 
 
      
        
          | oxDb._defineTimeFormattingRules  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
defines time formatting rules
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - array 
 
Definition at line 674 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 | 
  
   
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 758 of file oxdb.php.
 
 
      
        
          | static oxDb._getConfigParam  | 
          ( | 
          $  | 
           sConfigName | 
           )  | 
           [static, protected] | 
        
      
 
Return local config value by given name.
- Parameters:
 - 
  
     | string  | $sConfigName returning config name. | 
  
   
- Returns:
 - mixed 
 
Definition at line 167 of file oxdb.php.
 
 
      
        
          | oxDb._getConnectionId  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
Get connection ID
- Returns:
 - link identifier 
 
Definition at line 783 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 376 of file oxdb.php.
 
 
      
        
          | oxDb._getModules  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
Returns adodb modules string
- Returns:
 - string 
 
Definition at line 215 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 302 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 | 
  
   
- Returns:
 - null 
 
Definition at line 343 of file oxdb.php.
 
 
      
        
          | oxDb._regexp2ValidateDateInput  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
regular expressions to validate date input
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 635 of file oxdb.php.
 
 
      
        
          | oxDb._regexp2ValidateTimeInput  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
regular expressions to validate time input
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 646 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 282 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) | 
  
   
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 727 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) | 
  
   
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxUtilsDate
 
- Returns:
 - null 
 
Definition at line 696 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) | 
  
   
- Deprecated:
 - from 2012-11-21, not used here anymore. All date formatting moved to oxutilsdate
 
- Returns:
 - null 
 
Definition at line 576 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 244 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 | 
  
   
- Deprecated:
 - from 2012-11-21, use oxRegistry.get('oxUtilsDate')->convertDBDate()
 
- Returns:
 - string 
 
Definition at line 545 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 | 
  
   
- Deprecated:
 - from 2012-11-21, use oxRegistry.get('oxUtilsDate')->convertDBDateTime()
 
- Returns:
 - string 
 
Definition at line 515 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 | 
  
   
- Deprecated:
 - from 2012-11-21, use oxRegistry.get('oxUtilsDate')->convertDBTimestamp()
 
- Returns:
 - string 
 
Definition at line 530 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 795 of file oxdb.php.
 
 
Returns database object
- Parameters:
 - 
  
     | int  | $iFetchMode - fetch mode default numeric - 0 | 
  
   
- Exceptions:
 - 
  
  
 
- Returns:
 - oxLegacyDb 
 
Definition at line 405 of file oxdb.php.
 
 
      
        
          | static oxDb.getInstance  | 
          ( | 
           | 
           )  | 
           [static] | 
        
      
 
Returns Singleton instance
- Returns:
 - oxdb 
 
Definition at line 181 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 490 of file oxdb.php.
 
 
      
        
          | oxDb.isAdmin  | 
          ( | 
           | 
           )  | 
           [protected] | 
        
      
 
Cal function is admin from oxFunction. Need to mock in tests.
- Returns:
 - bool 
 
Definition at line 205 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 558 of file oxdb.php.
 
 
      
        
          | oxDb.quoteArray  | 
          ( | 
          $  | 
           aStrArray | 
           )  | 
           | 
        
      
 
Quotes an array.
- Parameters:
 - 
  
     | array  | $aStrArray array of strings to quote | 
  
   
- Returns:
 - array 
 
Definition at line 463 of file oxdb.php.
 
 
      
        
          | oxDb.resetTblDescCache  | 
          ( | 
           | 
           )  | 
           | 
        
      
 
Call to reset table description cache
- Returns:
 - null 
 
Definition at line 478 of file oxdb.php.
 
 
      
        
          | static oxDb.setConfig  | 
          ( | 
          $  | 
           oConfig | 
           )  | 
           [static] | 
        
      
 
Sets configs object with method getVar() and properties needed for successful connection.
- Parameters:
 - 
  
  
 
- Returns:
 - void 
 
Definition at line 142 of file oxdb.php.
 
 
      
        
          | oxDb.updateViews  | 
          ( | 
          $  | 
           aTables = null | 
           )  | 
           | 
        
      
 
 
Member Data Documentation
      
        
          oxDb.$_aSlaveHosts [static, private] | 
        
      
 
 
      
        
          oxDb.$_aTblDescCache = array() [static, protected] | 
        
      
 
 
      
        
          oxDb.$_blLogChangesInAdmin = false [static, private] | 
        
      
 
 
      
        
          oxDb.$_dbHost = '' [static, private] | 
        
      
 
 
      
        
          oxDb.$_dbName = '' [static, private] | 
        
      
 
 
      
        
          oxDb.$_dbPwd = '' [static, private] | 
        
      
 
 
      
        
          oxDb.$_dbType = '' [static, private] | 
        
      
 
 
      
        
          oxDb.$_dbUser = '' [static, private] | 
        
      
 
 
      
        
          oxDb.$_iDebug = 0 [static, private] | 
        
      
 
 
      
        
          oxDb.$_iMasterSlaveBalance [static, private] | 
        
      
 
 
      
        
          oxDb.$_instance = null [static, protected] | 
        
      
 
 
      
        
          oxDb.$_iUtfMode = 0 [static, private] | 
        
      
 
 
      
        
          oxDb.$_oDB = null [static, protected] | 
        
      
 
 
      
        
          oxDb.$_sAdminEmail [static, private] | 
        
      
 
 
      
        
          oxDb.$_sDefaultDatabaseConnection = null [static, private] | 
        
      
 
 
      
        
          oxDb.$_sLocalDateFormat [static, private] | 
        
      
 
 
      
        
          oxDb.$_sLocalTimeFormat [static, private] | 
        
      
 
 
      
        
          oxDb.$configSet = false [static] | 
        
      
 
 
The documentation for this class was generated from the following file: