UNA
Loading...
Searching...
No Matches
BxDolMData Class Reference
Inheritance diagram for BxDolMData:
BxDolMBlogs BxDolMChat BxDolMConv BxDolMEvents BxDolMFiles BxDolMForum BxDolMGroups BxDolMMarket BxDolMMemLevels BxDolMPhotoAlbums BxDolMPhotos BxDolMPolls BxDolMProfiles BxDolMProfilesFields BxDolMQuotes BxDolMShoutBox BxDolMSimpleMessenger BxDolMTimeline BxDolMVideoAlbums BxDolMVideos

Public Member Functions

 __construct (&$oMainModule, &$oDb)
 
 runMigration ()
 
 getTotalRecords ()
 
 dropMID ($sIdentFieldName='', $sTableName='')
 
 removeContent ()
 
 getFieldType ($sFieldName)
 

Protected Member Functions

 setResultStatus ($sStatus)
 
 getContentId ($iId)
 
 getProfileId ($iId)
 
 isModuleContentTransferred ($sModule)
 
 getAssocFields ()
 
 isKeyPreKeyExits ($sName)
 
 transferCategory ($sName, $sPrefix, $sCategory, $iValue=0, $sData='')
 
 transferPreValues ($sName, $sTitle, $mixedValues, $bAdd=false)
 
 getPreValuesBy ($sName, $sField='Order', $sValue='LKey', $iStart=0)
 
 getDefaultLang ($bName=true)
 
 getLKeyTranslations ($LKey)
 
 transferTags ($iObjectId, $iNewObjectId, $sType, $sTableKeywords)
 
 transferComments ($iObject, $iEntryId, $sType='photos')
 
 createMIDField ($sIdentFieldName='', $sTableName='')
 
 getLastMIDField ($sIdentFieldName='', $sTableName='')
 
 isItemExisted ($iItemId, $sField='id', $sIdentFieldName='', $sTableName='')
 
 setMID ($iId, $iItemId, $sField='id', $sIdentFieldName='')
 
 getDefaultPrivacy ($iDolProfileId, $sModule, $sAction)
 
 getValidPrivacy ($iPrivacy)
 
 getPrivacy ($iDolProfileId, $iPrivacy, $sModule='', $sAction='', $iDefaultPrivacy=0)
 

Protected Attributes

 $_oMainModule
 
 $_mDb
 
 $_sPrefix
 
 $_oDb
 
 $_sModuleName = ''
 
 $_sTableWithTransKey
 
 $_iTransferred = 0
 
 $_oLanguage = null
 
 $_aLanguages = array()
 
 $_sImagePhotoFiles = ''
 
 $_sTransferFieldIdent = 'mig_id'
 
 $_aSysProfiles = array()
 

Detailed Description

Base class for all migration classes contains general variables and function for modules' migration classes

Constructor & Destructor Documentation

◆ __construct()

BxDolMData::__construct ( & $oMainModule,
& $oDb )

Base class constructor

Parameters
ref$oMainModulemain module
ref$oDbconnect with Dolphin database
Returns
void

Reimplemented in BxDolMBlogs, BxDolMChat, BxDolMConv, BxDolMEvents, BxDolMFiles, BxDolMForum, BxDolMGroups, BxDolMMarket, BxDolMMemLevels, BxDolMPhotoAlbums, BxDolMPhotos, BxDolMPolls, BxDolMProfiles, BxDolMQuotes, BxDolMShoutBox, BxDolMSimpleMessenger, BxDolMTimeline, BxDolMVideoAlbums, and BxDolMVideos.

Member Function Documentation

◆ createMIDField()

BxDolMData::createMIDField ( $sIdentFieldName = '',
$sTableName = '' )
protected

Create migration field in main table for transferring content from Dolphin to UNA and contains id of the object in Dolphin

Parameters
string$sIdentFieldName
string$sTableNamename of the table to add the index field
Returns
mixed

◆ dropMID()

BxDolMData::dropMID ( $sIdentFieldName = '',
$sTableName = '' )

Drop migration field from the table

Parameters
string$sIdentFieldNamefield name to store id from original table (in case if you don't want to use default field)
string$sTableNametable name in which to create the field
Returns
int affected rows

Reimplemented in BxDolMChat, BxDolMShoutBox, and BxDolMVideoAlbums.

◆ getAssocFields()

BxDolMData::getAssocFields ( )
protected

Returns list of the fields which should be transferred to Persons module

Returns
array list of the fields names

◆ getContentId()

BxDolMData::getContentId ( $iId)
protected

Returns content id of transferred member from Dolphin

Parameters
int$iIdDolphin's profile ID
Returns
int

◆ getDefaultLang()

BxDolMData::getDefaultLang ( $bName = true)
protected

Returns default language name/id

Parameters
boolean$bNamereturn language name, otherwise id
Returns
mixed default language

◆ getLastMIDField()

BxDolMData::getLastMIDField ( $sIdentFieldName = '',
$sTableName = '' )
protected

Returns last migration field value

Parameters
string$sIdentFieldName
string$sTableNamename of the table to add the index field
Returns
int

◆ getLKeyTranslations()

BxDolMData::getLKeyTranslations ( $LKey)
protected

Returns translations for all existed languages on Dolphin by language key

Parameters
string$LKeylanguage key
Returns
array

◆ getPreValuesBy()

BxDolMData::getPreValuesBy ( $sName,
$sField = 'Order',
$sValue = 'LKey',
$iStart = 0 )
protected

Returns pre values array by list name in pairs format

Parameters
string$sNamename of the list
string$sFieldarray's index field name
string$sValuearray's value field name
int$iStart- allows to set start value and get values above it only
Returns
array

◆ getProfileId()

BxDolMData::getProfileId ( $iId)
protected

Returns person id of transferred member from Dolphin

Parameters
int$iIdDolphin's profile ID
Returns
int

◆ getTotalRecords()

◆ isItemExisted()

BxDolMData::isItemExisted ( $iItemId,
$sField = 'id',
$sIdentFieldName = '',
$sTableName = '' )
protected

Check if this record was already transferred

Parameters
int$iItemIdobject id in Dolphin
string$sFieldfield name with id values in Dolphin
string$sIdentFieldName
string$sTableNamename of the table to add the index field
Returns
int

◆ isKeyPreKeyExits()

BxDolMData::isKeyPreKeyExits ( $sName)
protected

Check if the list already exists in una pre values list

Parameters
string$sNamelist name
Returns
Boolean

◆ isModuleContentTransferred()

BxDolMData::isModuleContentTransferred ( $sModule)
protected

Check if the module was transfered

Parameters
string$sModulename from the list @uses BxDolMConfig\_aMigrationModules
Returns
int

◆ removeContent()

◆ runMigration()

◆ setMID()

BxDolMData::setMID ( $iId,
$iItemId,
$sField = 'id',
$sIdentFieldName = '' )
protected

Set value for migrated record to migration field

Parameters
int$iIdobject id in UNA
int$iItemIdobject id in Dolphin
string$sFieldid field name
string$sIdentFieldName
Returns
int affected rows

◆ setResultStatus()

BxDolMData::setResultStatus ( $sStatus)
protected

Set Migration Status

Parameters
string$sStatusmessage

◆ transferCategory()

BxDolMData::transferCategory ( $sName,
$sPrefix,
$sCategory,
$iValue = 0,
$sData = '' )
protected

Adds category to existed list

Parameters
string$sNamecategory title
string$sPrefixprefix for the module which should be used for new category (depends on module)
int$sCategorymodule's category's pre values Name
Returns
string value of the added category

Reimplemented in BxDolMBlogs, BxDolMEvents, BxDolMFiles, BxDolMForum, BxDolMGroups, BxDolMMarket, and BxDolMPolls.

◆ transferComments()

BxDolMData::transferComments ( $iObject,
$iEntryId,
$sType = 'photos' )
protected

Transfer comments for module's items

Parameters
int$iObjectobject ID in UNA
int$iEntryIdobject ID in Dolphin
string$sTypemodule name for transfer @uses BxDolMConfig\_aMigrationModules
Returns
int transferred comments number

◆ transferPreValues()

BxDolMData::transferPreValues ( $sName,
$sTitle,
$mixedValues,
$bAdd = false )
protected

Transfer fields lists with translations

Parameters
string$sNamefield name
string$sTitletranslation
mixed$mixedValuescontains name of the list which already exists or array values for transfer
bool$bAdddon't add value to already exited fields list
Returns
string list name for db insert with #!

◆ transferTags()

BxDolMData::transferTags ( $iObjectId,
$iNewObjectId,
$sType,
$sTableKeywords )
protected

Transfer Tags from the module, to meta

Parameters
int$iObjectIdmodule's item ID in Dolphin
int$iNewObjectIdmodule's item ID in UNA
int$sTypemodule's prefix in Dolphin
int$sTableKeywordstable name in UNA for tags migration
Returns
void

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