Public Member Functions | Protected Member Functions | Protected Attributes

oxDbMetaDataHandler Class Reference

Inheritance diagram for oxDbMetaDataHandler:
Collaboration diagram for oxDbMetaDataHandler:

List of all members.

Public Member Functions

 getFields ($sTableName)
 fieldExists ($sFieldName, $sTableName)
 getAllTables ()
 getCurrentMaxLangId ()
 getNextLangId ()
 getMultilangFields ($sTableName)
 addNewMultilangField ($sTableName)
 resetMultilangFields ($iLangId, $sTableName)
 addNewLangToDb ()
 resetLanguage ($iLangId)

Protected Member Functions

 _getDublicatedFieldSql ($sOldFieldName, $sNewFieldName, $sTableName, $sInsertAfterField=null)
 _getDublicatedFieldIndexesSql ($sOldFieldName, $sNewFieldName, $sTableName)
 _executeSql ($aSql)

Protected Attributes

 $_aDbTablesFields = null
 $_aTables = null
 $_iCurrentMaxLangId
 $_aSkipTablesOnReset = array( "oxcountry" )

Detailed Description

Class for handling database related operations

Definition at line 7 of file oxdbmetadatahandler.php.


Member Function Documentation

oxDbMetaDataHandler._executeSql ( aSql  )  [protected]

Executes arrary of sql strings

Parameters:
array $aSql SQL query array
Returns:
null

Definition at line 379 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler._getDublicatedFieldIndexesSql ( sOldFieldName,
sNewFieldName,
sTableName 
) [protected]

Get sql string for dublicating indexes for new multilang field

Parameters:
string $sOldFieldName old field name, which index will be copied
string $sNewFieldName new field name
string $sTableName table name in which new index will be added
Returns:
string

Definition at line 148 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler._getDublicatedFieldSql ( sOldFieldName,
sNewFieldName,
sTableName,
sInsertAfterField = null 
) [protected]

Get sql string for dublicating multilang field

Parameters:
string $sOldFieldName old field name, which will be copied
string $sNewFieldName new field name
string $sTableName table name in which new field will be added
string $sInsertAfterField insert after field name
Returns:
string

Definition at line 112 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.addNewLangToDb (  ) 

Add new language to database. Scans all tables and adds new multilanguage fields

Returns:
null

Definition at line 333 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.addNewMultilangField ( sTableName  ) 

Add new multilanguages fields to table. Dublicates all multilanguage fields and fields indexes with next available language ID

Parameters:
string $sTableName table name
Returns:
null

Definition at line 255 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.fieldExists ( sFieldName,
sTableName 
)

Check if field exists in table

Parameters:
string $sFieldName field name
string $sTableName table name
Returns:
bool

Definition at line 64 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.getAllTables (  ) 

Get all tables names from db. Views tables are not incuded in this list.

Returns:
array

Definition at line 85 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.getCurrentMaxLangId (  ) 

Get max language ID used in shop. For checking is used table "oxarticle" field "oxtitle"

Returns:
int

Definition at line 191 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.getFields ( sTableName  ) 

Get table fields

Parameters:
string $sTableName table name
Returns:
array

Definition at line 40 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.getMultilangFields ( sTableName  ) 

Get table multilanguge fields

Parameters:
string $sTableName table name
Returns:
array

Definition at line 233 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.getNextLangId (  ) 

Get next available language ID

Returns:
int

Definition at line 221 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.resetLanguage ( iLangId  ) 

Reseting all multilanguage fields with specific language id to default value in all tables. Only if language ID > 0.

Parameters:
int $iLangId Language id
Returns:
null

Definition at line 351 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.resetMultilangFields ( iLangId,
sTableName 
)

Reseting all multilanguage fields with specific language id to default value in selected table

Parameters:
int $iLangId Language id
string $sTableName Table name
Returns:
null

Definition at line 300 of file oxdbmetadatahandler.php.


Member Data Documentation

oxDbMetaDataHandler.$_aDbTablesFields = null [protected]

Definition at line 13 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.$_aSkipTablesOnReset = array( "oxcountry" ) [protected]

Definition at line 31 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.$_aTables = null [protected]

Definition at line 19 of file oxdbmetadatahandler.php.

oxDbMetaDataHandler.$_iCurrentMaxLangId [protected]

Definition at line 25 of file oxdbmetadatahandler.php.


The documentation for this class was generated from the following file: