UNA
BxDolProfileQuery Class Reference
Inheritance diagram for BxDolProfileQuery:
BxDolDb iBxDolSingleton BxDolFactory iBxDolSingleton

Public Member Functions

 __clone ()
 
 getProfilesByAccount ($iAccountId)
 
 getProfiles ($aParams)
 
 getProfileByContentTypeAccount ($iContentId, $sType, $iAccountId)
 
 getProfileByContentAndType ($iContentId, $sType, $bClearCache=false)
 
 insertProfile ($iAccountId, $iContentId, $sStatus, $sType='system')
 
 changeAccountId ($iProfileId, $iAccountId)
 
 changeStatus ($iProfileId, $sStatus)
 
 changeCfwValue ($iProfileId, $iValue)
 
 changeCfwItems ($iProfileId, $iValue)
 
 changeCfuItems ($iProfileId, $iValue)
 
 getCurrentProfileByAccount ($iAccountId, $bClearCache=false)
 
 getIdById ($iId, $bClearCache=false)
 
 getAccountInfoByProfileId ($iId)
 
 getEmailById ($iId)
 
 getInfoById ( $iID)
 
 isOnline ($iId)
 
 getOnlineCount ()
 
 delete ($iID)
 
 processDeletedProfiles ()
 
- Public Member Functions inherited from BxDolDb
 __clone ()
 
 connect ()
 
 disconnect ()
 
 ping ()
 
 pdoExec ($sQuery)
 
 pdoQuery ($sQuery)
 
 pdoExceptionHandler ($oException)
 
 getOption ($sName)
 
 getOne ($oStatement, $aBindings=array(), $iIndex=0)
 
 getRow ($oStatement, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getColumn ($oStatement, $aBindings=array(), $iFetchColumnNumber=0)
 
 getFirstRow ($oStatement, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getNextRow ($iFetchType=PDO::FETCH_ASSOC)
 
 getAll ($oStatement, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 fillArray ($oStatement, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getAllWithKey ($oStatement, $sFieldKey, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getPairs ($oStatement, $sFieldKey, $sFieldValue, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getNumRows ($oStatement=null)
 
 getAffectedRows ($oStatement=null)
 
 query ($oStatement, $aBindings=array(), $bVerbose=null)
 
 res ($oStatement, $aBindings=array(), $bVerbose=null)
 
 getServerInfo ()
 
 getVersion ()
 
 listTables ()
 
 getDbCacheObject ()
 
 escape ($s)
 
 implode_escape ($mixed)
 
 unescape ($mixed)
 
 prepare ($sQuery)
 
 prepareAsString ($sQuery)
 
 arrayToSQL ($a, $sDiv=',', $sOperator='=', $bWildcardSpaceChars=false)
 

Static Public Member Functions

static getInstance ()
 
- Static Public Member Functions inherited from BxDolDb
static getInstance ()
 

Protected Member Functions

 _getDataByField ($sField, $sValue)
 
 _getFieldByField ($sFieldRequested, $sFieldSearch, $sValue)
 
 _updateField ($iId, $sFieldForUpdate, $sValue)
 
- Protected Member Functions inherited from BxDolDb
 __construct ($aDbConf=false)
 

Detailed Description

All queries related to profiles

Member Function Documentation

◆ __clone()

BxDolProfileQuery::__clone ( )

Prevent cloning the instance

◆ _getDataByField()

BxDolProfileQuery::_getDataByField (   $sField,
  $sValue 
)
protected

Get profile by specified field name and value. It is for internal usage only. Use other funtions to get profile info, like getInfoById, etc.

Parameters
string$sFielddatabase field name
mixed$sValuedatabase field value
Returns
array with porfile info

◆ _getFieldByField()

BxDolProfileQuery::_getFieldByField (   $sFieldRequested,
  $sFieldSearch,
  $sValue 
)
protected

Get profile field by specified field name and value. In most cases it is for internal usage only. Use other funtions to get profile info, like getIdByEmail, etc.

Parameters
string$sFieldRequesteddatabase field name to return
string$sFieldSearchdatabase field name to search for
mixed$sValuedatabase field value
Returns
specified profile field value

◆ _updateField()

BxDolProfileQuery::_updateField (   $iId,
  $sFieldForUpdate,
  $sValue 
)
protected

Update some field by profile id In most cases it is for internal usage only. Use other funtions to get profile info, like updateLogged, etc.

Parameters
string$sFieldRequesteddatabase field name to return
string$sFieldSearchdatabase field name to search for
mixed$sValuedatabase field value
Returns
specified profile field value

◆ changeAccountId()

BxDolProfileQuery::changeAccountId (   $iProfileId,
  $iAccountId 
)

Update profile's account id

Parameters
$iProfileIdprofile id
$iAccountIdnew Account ID
Returns
true on success or false otherwise

◆ changeCfuItems()

BxDolProfileQuery::changeCfuItems (   $iProfileId,
  $iValue 
)

Update profile's content filter items (use)

Parameters
$iProfileIdprofile id
$iValuebitmask of available items
Returns
true on success or false otherwise

◆ changeCfwItems()

BxDolProfileQuery::changeCfwItems (   $iProfileId,
  $iValue 
)

Update profile's content filter items (watch)

Parameters
$iProfileIdprofile id
$iValuebitmask of available items
Returns
true on success or false otherwise

◆ changeCfwValue()

BxDolProfileQuery::changeCfwValue (   $iProfileId,
  $iValue 
)

Update profile's content filter value (watch)

Parameters
$iProfileIdprofile id
$iValuebitmask of selected items
Returns
true on success or false otherwise

◆ changeStatus()

BxDolProfileQuery::changeStatus (   $iProfileId,
  $sStatus 
)

Update profile's status

Parameters
$iProfileIdprofile id
$sStatusprofile status
Returns
true on success or false otherwise

◆ delete()

BxDolProfileQuery::delete (   $iID)

Delete profile info by id

Parameters
int$iIDprofile id
Returns
affected rows

◆ getAccountInfoByProfileId()

BxDolProfileQuery::getAccountInfoByProfileId (   $iId)

get account info by profile id

◆ getCurrentProfileByAccount()

BxDolProfileQuery::getCurrentProfileByAccount (   $iAccountId,
  $bClearCache = false 
)

Get current account profile.

Parameters
string$iAccountIdaccount id
Returns
current account's profile id

◆ getEmailById()

BxDolProfileQuery::getEmailById (   $iId)

get account email by profile id

◆ getIdById()

BxDolProfileQuery::getIdById (   $iId,
  $bClearCache = false 
)

get profile id by id

◆ getInfoById()

BxDolProfileQuery::getInfoById (   $iID)

Get profile info by id

Parameters
int$iIDprofile id
Returns
array with profile info

◆ getInstance()

static BxDolProfileQuery::getInstance ( )
static

Get singleton instance of the class

Implements iBxDolSingleton.

◆ getOnlineCount()

BxDolProfileQuery::getOnlineCount ( )

Get online profiles count

Returns
online profiles count

◆ getProfileByContentAndType()

BxDolProfileQuery::getProfileByContentAndType (   $iContentId,
  $sType,
  $bClearCache = false 
)

Get profile by content id and type.

Parameters
string$iAccountIdaccount id
Returns
array if aprofile ids, key is profile id

◆ getProfileByContentTypeAccount()

BxDolProfileQuery::getProfileByContentTypeAccount (   $iContentId,
  $sType,
  $iAccountId 
)

Get profile by content id, type and account.

Parameters
string$iAccountIdaccount id
Returns
array if aprofile ids, key is profile id

◆ getProfiles()

BxDolProfileQuery::getProfiles (   $aParams)

Get profile(s) by params

Parameters
array$aParamsbrowse params
Returns
array with profile(s)

◆ getProfilesByAccount()

BxDolProfileQuery::getProfilesByAccount (   $iAccountId)

Get all account profiles.

Parameters
string$iAccountIdaccount id
Returns
profile array

◆ insertProfile()

BxDolProfileQuery::insertProfile (   $iAccountId,
  $iContentId,
  $sStatus,
  $sType = 'system' 
)

Insert account and content id association. Also if currect profile id is not defined - it updates current profile id in account.

Parameters
$iAccountIdaccount id
$iContentIdcontent id
$sStatusprofile status
$sTypeprofile content type
Returns
inserted profile's id

◆ isOnline()

BxDolProfileQuery::isOnline (   $iId)

Is profile online by id

Parameters
int$iIdprofile id
Returns
profile online status

◆ processDeletedProfiles()

BxDolProfileQuery::processDeletedProfiles ( )

Reset deleted profile ids and assign system profile ids. Should be called after profiles module deletion. It can be called automatically if

'process_deleted_profiles' => 1

is specified in module config.php file in 'uninstall' section.


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