Cheetah
Public Member Functions | Public Attributes | List of all members
ChSpyModule Class Reference
Inheritance diagram for ChSpyModule:
ChWsbModule

Public Member Functions

 __construct (&$aModule)
 
 actionAdministration ()
 
 actionSetAsRead ()
 
 actionCheckUpdates ($sMode='global', $iLastActivityId=0, $sType='', $iProfileId=0)
 
 actionGetMemberBlock ($sActivityType='')
 
 getActivityPage ($iProfile=0, $sType='')
 
 getInitPart ($sType='', $iProfileId=0, $bActive=true)
 
 getActivityTypesToggles ($sPageUrl='')
 
 serviceResponseContent ($oAlert)
 
 serviceResponseProfiles ($oAlert)
 
 serviceUpdateHandlers ($sModuleUri='all', $bInstall=true)
 
 serviceGetSpyBlock ($sPage='index.php', $iProfileId=0)
 
 serviceGetSpyBlockFriends ($iProfileId=0)
 
 serviceGetMemberMenuSpyData ()
 
 serviceGetMemberMenuBubblesData ($iOldCount)
 
 _parseParameters ($sKey, &$aParameters)
 
 _getSpyBlock ($aVars)
 
 _proccesActivites ($aActivites, $sExtraStyles='', $inArray=false, $bSetViewed=false, $sExtraCssClass=null)
 
- Public Member Functions inherited from ChWsbModule
 __construct ($aModule)
 
 isLogged ()
 
 getUserId ()
 
 getUserPassword ()
 
 getTitleKey ($sUri)
 
 serviceGetBaseUrl ()
 

Public Attributes

 $aModuleInfo
 
 $sPathToModule
 
 $oSearch
 
 $sSpyMode
 
 $iMemberId
 
 $sEventsWrapper = 'spy_events'
 
 $iPage = 1
 
 $iPerPage
 
- Public Attributes inherited from ChWsbModule
 $_aModule
 
 $_oDb
 
 $_oTemplate
 
 $_oConfig
 

Additional Inherited Members

- Static Public Member Functions inherited from ChWsbModule
static getInstance ($sClassName)
 
static getTitle ($sUri)
 

Detailed Description

Spy module by Cheetah

This module will show all system events recived by some of modules. This is default module and Cheetah can not work properly without this module.

Profile's Wall: no wall events

Spy: no spy events

Memberships/ACL: no levels;

Service methods:

Process all alerts.

See also
ChSpyModule::serviceResponse ChWsbService::call('spy', 'response', array($oAlert));

This module will check for spy module alerts across all other Cheetah modules.

See also
ChSpyModule::serviceUpdateHandlers ChWsbService::call('spy', 'update_handlers', array(sModuleUri, $bInstall));

Function will get spy block;

See also
ChSpyModule::serviceGetSpyBlock ChWsbService::call('spy', 'get_spy_block', array($sPage, $iProfileId));

Function will generate content for member menu (latest activity);

See also
ChSpyModule::serviceGetMemberMenuSpyData ChWsbService::call('spy', 'get_member_menu_spy_data', array());

Function will generate content for member menu's bubbles;

See also
ChSpyModule::serviceGetMemberMenuBubblesData ChWsbService::call('spy', 'get_member_menu_spy_data', array(iOldCount));

Alerts: no alerts;

Definition at line 66 of file ChSpyModule.php.

Constructor & Destructor Documentation

◆ __construct()

ChSpyModule::__construct ( $aModule)

Class constructor ;

Parameters
:$aModule(array) - contain some information about this module; [ id ] - (integer) module's id ; [ title ] - (string) module's title ; [ vendor ] - (string) module's vendor ; [ path ] - (string) path to this module ; [ uri ] - (string) this module's URI ; [ class_prefix ] - (string) this module's php classes file prefix ; [ db_prefix ] - (string) this module's Db tables prefix ; [ date ] - (string) this module's date installation ;

Definition at line 100 of file ChSpyModule.php.

Member Function Documentation

◆ _getSpyBlock()

ChSpyModule::_getSpyBlock (   $aVars)

Generate spy block

Parameters
$aVarsarray $aVars[type] - string $aVars[page_url] - string $aVars[page] - integer $aVars[profile] - integer
Returns
array

Definition at line 578 of file ChSpyModule.php.

◆ _parseParameters()

ChSpyModule::_parseParameters (   $sKey,
$aParameters 
)

Function will replace all markers into recived string;

Parameters
:$sKey(string) - language key;
:$aParameters(array) - key's parameters;
Returns
: (string) - replaced string;

Definition at line 557 of file ChSpyModule.php.

◆ _proccesActivites()

ChSpyModule::_proccesActivites (   $aActivites,
  $sExtraStyles = '',
  $inArray = false,
  $bSetViewed = false,
  $sExtraCssClass = null 
)

Function will procces recived activites;

Parameters
:$aActivites(array);
:$sExtraStyles(string) - extra css styles;
:$bSetViewed(boolean) - if isset this parameter activity will; set as viwed;
Returns
: (mixed) - html presentation data or array;

Definition at line 662 of file ChSpyModule.php.

◆ actionAdministration()

ChSpyModule::actionAdministration ( )

Function will generate the poll's admin page ;

Returns
: (text) - Html presentation data ;

Definition at line 129 of file ChSpyModule.php.

◆ actionCheckUpdates()

ChSpyModule::actionCheckUpdates (   $sMode = 'global',
  $iLastActivityId = 0,
  $sType = '',
  $iProfileId = 0 
)

Function will get new activity by type;

Parameters
:$sMode(string) - page's mode (possible values : global, friends_events);
:$iLastActivityId(integer) - last event's Id;
:$sType(string) - activity type;
Returns
: (text) - html presentation data;

Definition at line 196 of file ChSpyModule.php.

◆ actionGetMemberBlock()

ChSpyModule::actionGetMemberBlock (   $sActivityType = '')

Function will get profile's spy block by ajax method;

Parameters
:$iPage(integer) - current page;
:$sActivityType(string) - type of activity;
Returns
: (text) html presentation data;

Definition at line 262 of file ChSpyModule.php.

◆ actionSetAsRead()

ChSpyModule::actionSetAsRead ( )

Function will set all profile's activity as read;

Returns
: void;

Definition at line 183 of file ChSpyModule.php.

◆ getActivityPage()

ChSpyModule::getActivityPage (   $iProfile = 0,
  $sType = '' 
)

Function will generate global spy's page (content activity only!);

Parameters
:$sType(string) - type of activity;
Returns
: (text) - html presentation data;

Definition at line 273 of file ChSpyModule.php.

◆ getActivityTypesToggles()

ChSpyModule::getActivityTypesToggles (   $sPageUrl = '')

Function will generate activity types toggle elements;

Parameters
:$sPageUrl(string) - nedded page's url;
Returns
: (text) - html presentation data;

Definition at line 357 of file ChSpyModule.php.

◆ getInitPart()

ChSpyModule::getInitPart (   $sType = '',
  $iProfileId = 0,
  $bActive = true 
)

Function will get the javascript code that will update spy page every times;

Parameters
:$iProfileId(integer) - profile's Id;
:$sType(string) - type of activity;
Returns
: (text) - javascript code;

Definition at line 307 of file ChSpyModule.php.

◆ serviceGetMemberMenuBubblesData()

ChSpyModule::serviceGetMemberMenuBubblesData (   $iOldCount)

Function will get bubbles data for member menu;

Parameters
:$iOldCount(integer) - received old count of messages (if will difference will generate message)
Returns
: (array) [count] - (integer) number of new notifications; [message] - (string) notify's messages;

Definition at line 499 of file ChSpyModule.php.

◆ serviceGetMemberMenuSpyData()

ChSpyModule::serviceGetMemberMenuSpyData ( )

Function will generate content for member menu;

Returns
: (text) - html presentation data;

Definition at line 458 of file ChSpyModule.php.

◆ serviceGetSpyBlock()

ChSpyModule::serviceGetSpyBlock (   $sPage = 'index.php',
  $iProfileId = 0 
)

Generate spy block

Parameters
$sPagestring
$iProfileIdinteger
Returns
array

Definition at line 433 of file ChSpyModule.php.

◆ serviceGetSpyBlockFriends()

ChSpyModule::serviceGetSpyBlockFriends (   $iProfileId = 0)

Definition at line 442 of file ChSpyModule.php.

◆ serviceResponseContent()

ChSpyModule::serviceResponseContent (   $oAlert)

SERVICE METHODS Process alert.

Parameters
ChWsbAlerts$oAlertan instance with accured alert.

Definition at line 396 of file ChSpyModule.php.

◆ serviceResponseProfiles()

ChSpyModule::serviceResponseProfiles (   $oAlert)

Definition at line 402 of file ChSpyModule.php.

◆ serviceUpdateHandlers()

ChSpyModule::serviceUpdateHandlers (   $sModuleUri = 'all',
  $bInstall = true 
)

Definition at line 408 of file ChSpyModule.php.

Member Data Documentation

◆ $aModuleInfo

ChSpyModule::$aModuleInfo

Definition at line 69 of file ChSpyModule.php.

◆ $iMemberId

ChSpyModule::$iMemberId

Definition at line 80 of file ChSpyModule.php.

◆ $iPage

ChSpyModule::$iPage = 1

Definition at line 84 of file ChSpyModule.php.

◆ $iPerPage

ChSpyModule::$iPerPage

Definition at line 85 of file ChSpyModule.php.

◆ $oSearch

ChSpyModule::$oSearch

Definition at line 75 of file ChSpyModule.php.

◆ $sEventsWrapper

ChSpyModule::$sEventsWrapper = 'spy_events'

Definition at line 82 of file ChSpyModule.php.

◆ $sPathToModule

ChSpyModule::$sPathToModule

Definition at line 72 of file ChSpyModule.php.

◆ $sSpyMode

ChSpyModule::$sSpyMode

Definition at line 77 of file ChSpyModule.php.


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