UNA
Loading...
Searching...
No Matches
BxNtfsDb Class Reference
Inheritance diagram for BxNtfsDb:
BxBaseModNotificationsDb BxBaseModGeneralDb BxDolModuleDb BxDolModuleQuery BxDolDb iBxDolSingleton BxDolFactory iBxDolSingleton

Public Member Functions

 __construct (&$oConfig)
 
 markAsClicked ($iUserId, $iEventId)
 
 markAsRead ($iUserId, $iEventId)
 
 getLastRead ($iUserId)
 
 deleteEvent ($aParams, $sWhereAddon="")
 
 getEvents ($aParams, $bReturnCount=false)
 
 getEventsToProcess ($iLimit=0)
 
 queueGet ($aParams)
 
 queueAdd ($aSet)
 
 queueDelete ($aWhere)
 
 queueDeleteByProfile ($iProfileId, $iEventId)
 
 queueDeleteByIds ($mixedId)
 
 cleanEvents ($iClearIntervalInDays)
 
 filterProfileIdsByModule ($aIds, $mixedModule)
 
- Public Member Functions inherited from BxBaseModNotificationsDb
 getTable ()
 
 isTableAlias ()
 
 getTableAlias ()
 
 getAlertHandlerId ()
 
 insertData ($aData)
 
 deleteData ($aData)
 
 deleteModuleEvents ($aData)
 
 activateModuleEvents ($aData, $bActivate=true)
 
 getHandlers ($aParams=array())
 
 getSetting ($aParams=array())
 
 updateSetting ($aParamsSet, $aParamsWhere)
 
 activateSettingById ($bActive, $mixedId)
 
 activateSettingByIdUser ($bActive, $iUserId, $mixedSettingId)
 
 changeSettingById ($sField, $mixedValue, $mixedId)
 
 changeSettingByIdUser ($sField, $mixedValue, $iUserId, $mixedSettingId)
 
 initSettingUser ($iUserId)
 
 insertSettingUser ($aParamsSet)
 
 deleteSettingUser ($aParamsWhere)
 
 insertEvent ($aParamsSet)
 
 updateEvent ($aParamsSet, $aParamsWhere)
 
 getEvents ($aParams)
 
- Public Member Functions inherited from BxBaseModGeneralDb
 getContentInfoById ($iContentId)
 
 getEntriesBy ($aParams=array())
 
 getEntriesNumByContext ($iProfileId)
 
 getEntriesByAuthor ($iProfileId)
 
 getEntriesNumByAuthor ($iProfileId)
 
 getEntriesNumByParams ($aParams=[])
 
 updateEntriesBy ($aParamsSet, $aParamsWhere)
 
 updateStatusAdmin ($iContentId, $isActive)
 
 publishEntries ()
 
 alterFulltextIndex ()
 
 deleteNestedById ($iNestedId, $sTableKey, $sTableName)
 
 getNestedBy ($aParams, $sTableName)
 
 getStatByProfile ($iAuthorId)
 
- Public Member Functions inherited from BxDolModuleDb
 __construct ($oConfig)
 
 getPrefix ()
 
- Public Member Functions inherited from BxDolModuleQuery
 __clone ()
 
 getModuleById ($iId, $bFromCache=true)
 
 getModuleByName ($sName, $bFromCache=true)
 
 getModuleByUri ($sUri, $bFromCache=true)
 
 enableModuleByUri ($sUri)
 
 disableModuleByUri ($sUri)
 
 setModulePendingUninstall ($sUri, $bPendingUninstall)
 
 isModule ($sUri)
 
 isModuleByName ($sName)
 
 isModuleParamsUsed ($sName, $sUri, $sPath, $sPrefixDb, $sPrefixClass)
 
 isEnabled ($sUri)
 
 isEnabledByName ($sName)
 
 getModules ()
 
 getModulesBy ($aParams=array(), $bFromCache=true)
 
 isModuleContent ($sName)
 
 isModuleContext ($sName)
 
 isModuleProfile ($sName)
 
 getModulesUri ()
 
 getDependent ($sName, $sUri)
 
 updateModule ($aParamsSet, $aParamsWhere=array())
 
 checkModulesSubtypes ()
 
- Public Member Functions inherited from BxDolDb
 setReadOnlyMode ($b)
 
 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)
 
 lastId ()
 
 query ($oStatement, $aBindings=array(), $bVerbose=null)
 
 res ($oStatement, $aBindings=array(), $bVerbose=null)
 
 getServerInfo ()
 
 getVersion ()
 
 listTables ()
 
 getFields ($sTable)
 
 fetchField ($oStatement, $iField, $aBindings=array())
 
 isTableExists ($sTable)
 
 isFieldExists ($sTable, $sFieldName)
 
 isIndexExists ($sTable, $sIndexName)
 
 error ($aError)
 
 cacheParams ($bForceCacheInvalidate=false, $bForceCacheInvalidateMixed=false)
 
 cacheParamsClear ($sCacheName='')
 
 isParam ($sKey, $bFromCache=true)
 
 addParam ($sName, $sValue, $iKateg, $sDesc, $sType)
 
 getParam ($sKey, $bFromCache=true)
 
 setParam ($sKey, $mixedValue, $iMixId=0)
 
 getParamsMix ($iId)
 
 getParamsMixActive ($sType)
 
 getParamsMixes ($sType, $mixedPublished=false)
 
 setTimezone ($sTimezone)
 
 getEncoding ()
 
 setErrorChecking ($b)
 
 getDbCacheObject ()
 
 genDbCacheKey ($sName)
 
 getCache ($sName, $sFunc)
 
 setCache ($sName, $mData)
 
 fromCache ($sName, $sFunc)
 
 cleanCache ($sName)
 
fromMemory ($sName, $sFunc)
 
 cleanMemory ($sName)
 
 cleanMemoryAll ()
 
 escape ($s)
 
 implode_escape ($mixed)
 
 unescape ($mixed)
 
 prepare ($sQuery)
 
 prepareAsString ($sQuery)
 
 arrayToSQL ($a, $sDiv=',', $sOperator='=', $bWildcardSpaceChars=false)
 
 executeSQL ($sPath, $aReplace=array(), $isBreakOnError=true)
 

Protected Member Functions

 _getSqlPartsEvents ($aParams)
 
 _getSqlPartsEventsList ($aParams)
 
- Protected Member Functions inherited from BxBaseModGeneralDb
 _getEntriesBySearchIds ($aParams, &$aMethod, &$sSelectClause, &$sJoinClause, &$sWhereClause, &$sOrderClause, &$sLimitClause)
 
 _addCustomConditions ($aParams, &$aMethod, &$sSelectClause, &$sJoinClause, &$sWhereClause, &$sOrderClause, &$sLimitClause)
 
 _addConditionsForAuthorStatus ($aParams, &$aMethod, &$sSelectClause, &$sJoinClause, &$sWhereClause, &$sOrderClause, &$sLimitClause)
 
 _addConditionsForCf ($aParams, &$aMethod, &$sSelectClause, &$sJoinClause, &$sWhereClause, &$sOrderClause, &$sLimitClause)
 
 _getEntriesBySearchIdsOrder ($aParams, &$sOrderClause)
 
 _getEbsiLike ($sValue)
 
- Protected Member Functions inherited from BxDolDb
 balancer ()
 
 isParamInCache ($sKey)
 
 log ($s)
 
 executeStatement ($oStatement, $aBindings=array(), $bVerbose=null, &$iErrorCode=null)
 
 executeStatementException ($oStatement, $aBindings=array(), $bVerbose=null)
 
 executeStatementSilent ($oStatement, $aBindings=array(), $bVerbose=null)
 
 errorOutput ($aError)
 

Protected Attributes

 $_sTableEvt2Usr
 
 $_sTableQueue
 
 $_sTableRead
 
- Protected Attributes inherited from BxBaseModNotificationsDb
 $_oConfig
 
 $_sTable
 
 $_sTableAlias
 
 $_sTableHandlers
 
 $_sTableSettings
 
 $_sTableSettings2Users
 
 $_sHandlerMask
 
 $_aDeliveryTypes
 
- Protected Attributes inherited from BxBaseModGeneralDb
 $_oConfig
 
- Protected Attributes inherited from BxDolModuleDb
 $_sPrefix
 
- Protected Attributes inherited from BxDolDb
 $_bPdoPersistent
 
 $_iPdoFetchType
 
 $_iPdoErrorMode
 
 $_bErrorChecking
 
 $_aError
 
 $_sHost
 
 $_sPort
 
 $_sSocket
 
 $_sDbname
 
 $_sUser
 
 $_sPassword
 
 $_sCharset
 
 $_sStorageEngine
 
 $_oStatement = null
 
 $_oDbCacheObject = null
 

Additional Inherited Members

- Static Public Member Functions inherited from BxDolModuleQuery
static getInstance ()
 
- Static Public Member Functions inherited from BxDolDb
static getInstanceWithConf ($aDbConf, &$sError)
 
static getLink ()
 
- Static Protected Attributes inherited from BxDolDb
static $_rLink
 
static $_aDbCacheData
 
static $_aParams
 
static $_sParamsCacheName = 'sys_options'
 
static $_sParamsCacheNameMixed = 'sys_options_mixed_'
 
static $_sParamsCacheNameMix = 'sys_options_mix_'
 
static $_sErrorKey = 'bx_db_error'
 
static $_aErrors
 
static $_bReadOnlyMode = true
 
static $_bMultuServersMode = false
 

Constructor & Destructor Documentation

◆ __construct()

BxNtfsDb::__construct ( & $oConfig)

Reimplemented from BxBaseModNotificationsDb.

Member Function Documentation

◆ _getSqlPartsEvents()

BxNtfsDb::_getSqlPartsEvents ( $aParams)
protected

Reimplemented from BxBaseModNotificationsDb.

◆ _getSqlPartsEventsList()

BxNtfsDb::_getSqlPartsEventsList ( $aParams)
protected

'personal' notifications are taken by:

  1. 'owner_id', in case of somebody performed an action in requested profile's context 'object_privacy_view' < 0 AND 'owner_id' == ABS('object_privacy_view')) Currently it happens when somebody posted a Direct Timeline post in requested profile.
  2. 'object_owner_id', in case of somebody performed an action with content owned by the requested profile.

'follow' notifications are taken by connection with owner_id

Hooks:

'bx_notifications', 'get_list_by_type' - hook to override SQL query parts which are used to get events list

  • $unit_name - equals bx_notifications
  • $action - equals get_list_by_type
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • type - [string] a type of events list
    • owner_id - [int] owner profile id
    • params - [array] browse params array as key&value pairs
    • table - [string] datatbase table name
    • join_clause - [string] by ref, 'join' part of SQL query, can be overridden in hook processing
    • where_clause - [string] by ref, 'where' part of SQL query, can be overridden in hook processing
    • where_clause_start_from - [string] by ref, 'start_from' condition in 'where' part of SQL query, can be overridden in hook processing
    • where_clause_status - [string] by ref, 'status' condition in 'where' part of SQL query, can be overridden in hook processing
    • where_clause_modules - [string] by ref, 'modules' condition in 'where' part of SQL query, can be overridden in hook processing
    • where_clause_new - [string] by ref, 'new' condition in 'where' part of SQL query, can be overridden in hook processing
    • where_clause_settings - [string] by ref, 'settings' conditions in 'where' part of SQL query, can be overridden in hook processing
    • where_clause_type - [string] by ref, 'type' condition in 'where' part of SQL query, can be overridden in hook processing
      HOOKS
      'bx_notifications', 'get_list_by_type' - hook to override SQL query parts which are used to get events list

Reimplemented from BxBaseModNotificationsDb.

◆ deleteEvent()

BxNtfsDb::deleteEvent ( $aParams,
$sWhereAddon = "" )

Reimplemented from BxBaseModNotificationsDb.

◆ getEvents()

BxNtfsDb::getEvents ( $aParams,
$bReturnCount = false )

Hooks:

'bx_notifications', 'get_events_before' - hook to override params which are used to get events

Parts: PO - notifications related to Owner's content PC - notifications related to Connections' content

Hooks:

'bx_notifications', 'get_events' - hook to override events list which will be received from database

  • $unit_name - equals bx_notifications
  • $action - equals get_events
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • browse - [string] browsing type
    • params - [array] browse params array as key&value pairs
    • table - [string] datatbase table name
    • method - [string] by ref, database class method name,
      See also
      BxDolDb, can be overridden in hook processing
    • select_clause - [string] by ref, 'select' part of SQL query, can be overridden in hook processing
    • join_clause_po - [string] by ref, 'join' part of Owner's SQL query, can be overridden in hook processing
    • join_clause_pc - [string] by ref, 'join' part of Connections' SQL query, can be overridden in hook processing
    • where_clause_po - [string] by ref, 'where' part of Owner's SQL query, can be overridden in hook processing
    • where_clause_pc - [string] by ref, 'where' part of Connections' SQL query, can be overridden in hook processing
    • order_clause_po - [string] by ref, 'order' part of Owner's SQL query, can be overridden in hook processing
    • order_clause_pc - [string] by ref, 'order' part of Connections' SQL query, can be overridden in hook processing
    • order_clause - [string] by ref, 'order' part of SQL query, can be overridden in hook processing
    • limit_clause - [string] by ref, 'limit' part of SQL query, can be overridden in hook processing
    • query_po - [string] by ref, Owner's SQL query, can be overridden in hook processing
    • query_pc - [string] by ref, Connections' SQL query, can be overridden in hook processing
      HOOKS
      'bx_notifications', 'get_events' - hook to override events list which will be received from database

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