\ForWhomTheBellTolls
Incoming calls notifications class
Synopsis
class ForWhomTheBellTolls
{
- // constants
- const CACHE_KEY = 'FWTBT_REPLY';
- const URL_CALLS = '?module=fwtbt&getcalls=true';
- const URL_PROFILE = '?module=userprofile&username=';
- // members
- protected array $altCfg = ;
- protected array $billingCfg = ;
- protected integer $pollingInterval = 7000;
- protected integer $popupTimeout = 10000;
- protected $cache = '';
- protected integer $cachingTimeout = 7;
- protected integer $offsetNumber = 3;
- protected integer $offsetStatus = 5;
- protected integer $offsetLogin = 7;
- protected bool $anywhere = false;
- protected array $showFor = ;
- protected string $myLogin = '';
- protected string $dataSource = '';
- // methods
- public void __construct()
- protected void loadConfig()
- protected void initCache()
- protected void setOptions()
- public void getCalls()
- protected string getCallsNotification()
- public string/void renderWidget()
Constants
Name | Value |
---|---|
CACHE_KEY | 'FWTBT_REPLY' |
URL_CALLS | '?module=fwtbt&getcalls=true' |
URL_PROFILE | '?module=userprofile&username=' |
Members
protected
- $altCfg
—
array
Contains system alter config as key=>value - $anywhere
—
bool
Render notification code everywhere in web interface or just on taskbar - $billingCfg
—
array
Contains system billing config as key=>value - $cache
—
System cache object placeholder - $cachingTimeout
—
int
Caching timeout based on polling timeout in seconds. -
$dataSource
Default log path to parse - $myLogin
—
string
Contains current instance user login - $offsetLogin
—
int
Default detected login offset - $offsetNumber
—
int
Default number position offset - $offsetStatus
—
int
Default call status position offset - $pollingInterval
—
int
Calls polling interval in ms. - $popupTimeout
—
int
Notification display timeout in ms. - $showFor
—
array
Array of administrators for whom display notifications.
Methods
protected
- getCallsNotification() — Returns notification frontend with some background polling
- initCache() — Inits system cache
- loadConfig() — Loads required configs and sets some options
- setOptions() — Sets basic object instance options
public
- __construct() — Creates new FWTBT instance
- getCalls() — Renders calls data by last minute
- renderWidget() — Renders widget code if it required for current situation