Cheetah
Public Member Functions | Public Attributes | List of all members
ChSpyDb Class Reference
Inheritance diagram for ChSpyDb:
ChWsbModuleDb ChWsbDb

Public Member Functions

 __construct (&$oConfig)
 
 getInternalHandlers ()
 
 getActivityCount ($sType='')
 
 getLastActivityId ($sType='')
 
 getLastFriendsActivityId ($iProfileId, $sType='')
 
 getFriendsActivityCount ($iProfileId, $sType='')
 
 getSettingsCategory ($sValueName)
 
 setViewed ($iActivityId)
 
 setViewedProfileActivity ($iProfileId)
 
 insertData (&$aData)
 
 deleteData (&$aData)
 
 createActivity ($sAlertUnit, $sAlertAction, $iObjectId, $iCommentId, $iSenderId, $iRecipientId, $aActivityInfo)
 
 deleteActivityByObject ($sUnit, $iObjectId, $iCommentId=0)
 
 deleteActivityByUser ($iUserId)
 
 attachFriendEvent ($iEventId, $iSenderId, $iFriendId)
 
 deleteUselessData ($iDays=0)
 
- Public Member Functions inherited from ChWsbModuleDb
 __construct ($oConfig=null)
 
 getPrefix ()
 
 getModulesBy ($aParams=array())
 
 getModuleById ($iId)
 
 getModuleByUri ($sUri)
 
 isModule ($sUri)
 
 isModuleParamsUsed ($sUri, $sPath, $sPrefixDb, $sPrefixClass)
 
 getModules ()
 
 getDependent ($sUri)
 
 getSettingsCategoryId ($sCatName)
 
- Public Member Functions inherited from ChWsbDb
 setTimezone ($sTimezone)
 
 getLink ()
 
 res ($sQuery, $aBindings=[], $bReplaying=false)
 
 getAll ($sQuery, $aBindings=[], $iFetchType=PDO::FETCH_ASSOC)
 
 getRow ($sQuery, $aBindings=[], $iFetchStyle=PDO::FETCH_ASSOC)
 
 getColumn ($sQuery, $aBindings=[])
 
 getOne ($sQuery, $aBindings=[], $iIndex=0)
 
 getFirstRow ($sQuery, $aBindings=[], $iFetchStyle=PDO::FETCH_ASSOC)
 
 getNextRow ()
 
 getAllWithKey ($sQuery, $sFieldKey, $aBindings=[], $iFetchType=PDO::FETCH_ASSOC)
 
 getPairs ($sQuery, $sFieldKey, $sFieldValue, $aBindings=[])
 
 query ($sQuery, $aBindings=[])
 
 getNumRows ($oStmt=null)
 
 getAffectedRows ($oStmt=null)
 
 fillArray ($oStmt, $iFetchType=PDO::FETCH_ASSOC)
 
 lastId ()
 
 getParam ($sName, $bCache=true)
 
 setParam ($sName, $sValue)
 
 listTables ()
 
 getFields ($sTable)
 
 isFieldExists ($sTable, $sFieldName)
 
 fetchField ($mixedQuery, $iField, $aBindings=[])
 
 getDbCacheObject ()
 
 genDbCacheKey ($sName)
 
 fromCache ($sName, $sFunc)
 
 cleanCache ($sName)
 
fromMemory ($sName, $sFunc)
 
 cleanMemory ($sName)
 
 arrayToSQL ($a, $sDiv=',')
 
 escape ($sText, $bReal=true)
 
 implode_escape ($mixed)
 
 unescape ($mixed)
 

Public Attributes

 $_oConfig
 
 $sTablePrefix
 
- Public Attributes inherited from ChWsbModuleDb
 $_sPrefix
 
- Public Attributes inherited from ChWsbDb
 $port
 
 $socket
 
 $dbname
 
 $user
 
 $password
 
 $oParams = null
 
 $oDbCacheObject = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ChWsbDb
static getInstance ()
 
- Protected Member Functions inherited from ChWsbDb
 __construct ()
 
 connect ()
 
 disconnect ()
 
- Protected Attributes inherited from ChWsbDb
 $host
 
 $link
 
 $oCurrentStmt
 
 $iCurrentFetchStyle
 
- Static Protected Attributes inherited from ChWsbDb
static $instance
 

Detailed Description

This work, "Cheetah - https://www.cheetahwsb.com", is a derivative of "Dolphin Pro V7.4.2" by BoonEx Pty Limited - https://www.boonex.com/, used under CC-BY. "Cheetah" is licensed under CC-BY by Dean J. Bassett Jr. CC-BY License - http://creativecommons.org/licenses/by/3.0/

Definition at line 10 of file ChSpyDb.php.

Constructor & Destructor Documentation

◆ __construct()

ChSpyDb::__construct ( $oConfig)

Constructor.

Definition at line 18 of file ChSpyDb.php.

Member Function Documentation

◆ attachFriendEvent()

ChSpyDb::attachFriendEvent (   $iEventId,
  $iSenderId,
  $iFriendId 
)

Function will attach created event to their friend ;

Parameters
:$iEventId(integer) - event's Id;
:$iSenderId(integer) - sender's Id;
:$iFriendId(integer) - friend's Id;
Returns
: void;

Definition at line 397 of file ChSpyDb.php.

◆ createActivity()

ChSpyDb::createActivity (   $sAlertUnit,
  $sAlertAction,
  $iObjectId,
  $iCommentId,
  $iSenderId,
  $iRecipientId,
  $aActivityInfo 
)

Function will create new activity;

Parameters
:$iSenderId(integer) - activity's sender id;
:$iRecipientId(integer) - activity's recipient id;
:$aActivityInfo(array) - with some event's information; [ lang_key ] - (string) language key; [ params ] - (array) some nedded parameters; [ type ] - (string) type of activity;
Returns
: (integer) created event's Id;

Definition at line 331 of file ChSpyDb.php.

◆ deleteActivityByObject()

ChSpyDb::deleteActivityByObject (   $sUnit,
  $iObjectId,
  $iCommentId = 0 
)

Definition at line 363 of file ChSpyDb.php.

◆ deleteActivityByUser()

ChSpyDb::deleteActivityByUser (   $iUserId)

Definition at line 378 of file ChSpyDb.php.

◆ deleteData()

ChSpyDb::deleteData ( $aData)

Definition at line 253 of file ChSpyDb.php.

◆ deleteUselessData()

ChSpyDb::deleteUselessData (   $iDays = 0)

Function will delete all unnecessary events;

Parameters
:$iCount(integer) - number of rows that need to delete;
Returns
: void;

Definition at line 422 of file ChSpyDb.php.

◆ getActivityCount()

ChSpyDb::getActivityCount (   $sType = '')

Function will return number of all events;

Parameters
:$sType(string) - type of activity;
Returns
: (integer);

Definition at line 43 of file ChSpyDb.php.

◆ getFriendsActivityCount()

ChSpyDb::getFriendsActivityCount (   $iProfileId,
  $sType = '' 
)

Function will return number of all friends events;

Parameters
:$sType(string) - type of activity;
:$iProfile(integer) - profile's id;
Returns
: (integer);

Definition at line 126 of file ChSpyDb.php.

◆ getInternalHandlers()

ChSpyDb::getInternalHandlers ( )

Function will get all internal spy's handlers;

Returns
: (array);

Definition at line 31 of file ChSpyDb.php.

◆ getLastActivityId()

ChSpyDb::getLastActivityId (   $sType = '')

Function will get the latest event's Id;

Parameters
:$sType(string) - type of activity;
Returns
: (integer);

Definition at line 64 of file ChSpyDb.php.

◆ getLastFriendsActivityId()

ChSpyDb::getLastFriendsActivityId (   $iProfileId,
  $sType = '' 
)

Function will get the latest friends event's Id;

Parameters
:$sType(string) - type of activity;
:$iProfile(integer) - profile's id;
Returns
: (integer);

Definition at line 86 of file ChSpyDb.php.

◆ getSettingsCategory()

ChSpyDb::getSettingsCategory (   $sValueName)

Function will return global category number;

Returns
: (integer) - category's number;

Definition at line 162 of file ChSpyDb.php.

◆ insertData()

ChSpyDb::insertData ( $aData)

Definition at line 194 of file ChSpyDb.php.

◆ setViewed()

ChSpyDb::setViewed (   $iActivityId)

Function will set activiti as viwed;

Parameters
:$iActivityId(integer) - activity's id;
Returns
: void;

Definition at line 174 of file ChSpyDb.php.

◆ setViewedProfileActivity()

ChSpyDb::setViewedProfileActivity (   $iProfileId)

Function will set all profile's activiti as viwed;

Parameters
:$iProfileId(integer) - profile's id;
Returns
: void;

Definition at line 187 of file ChSpyDb.php.

Member Data Documentation

◆ $_oConfig

ChSpyDb::$_oConfig

Definition at line 12 of file ChSpyDb.php.

◆ $sTablePrefix

ChSpyDb::$sTablePrefix

Definition at line 13 of file ChSpyDb.php.


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