Public Member Functions | |
prepare () | |
getPrepareAt () | |
setPrepareAt ($time=null) | |
getUpdateFrequency () | |
getOnlineInterval () | |
Public Attributes | |
const | XML_PATH_ONLINE_INTERVAL = 'customer/online_customers/online_minutes_interval' |
const | XML_PATH_UPDATE_FREQUENCY = 'log/visitor/online_update_frequency' |
Protected Member Functions | |
_construct () | |
_getResource () |
Definition at line 35 of file Online.php.
_construct | ( | ) | [protected] |
Initialize resource model
Reimplemented from Varien_Object.
Definition at line 44 of file Online.php.
00045 { 00046 $this->_init('log/visitor_online'); 00047 }
_getResource | ( | ) | [protected] |
Retrieve resource instance wrapper
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 54 of file Online.php.
00055 { 00056 return parent::_getResource(); 00057 }
getOnlineInterval | ( | ) |
Retrieve Online Interval (in minutes)
Definition at line 110 of file Online.php.
00111 { 00112 $value = intval(Mage::getStoreConfig(self::XML_PATH_ONLINE_INTERVAL)); 00113 if (!$value) { 00114 $value = Mage_Log_Model_Visitor::DEFAULT_ONLINE_MINUTES_INTERVAL; 00115 } 00116 return $value; 00117 }
getPrepareAt | ( | ) |
Retrieve last prepare at timestamp
Definition at line 75 of file Online.php.
00076 { 00077 return Mage::app()->loadCache('log_visitor_online_prepare_at'); 00078 }
getUpdateFrequency | ( | ) |
Retrieve data update Frequency in second
Definition at line 100 of file Online.php.
00101 { 00102 return Mage::getStoreConfig(self::XML_PATH_UPDATE_FREQUENCY); 00103 }
prepare | ( | ) |
Prepare Online visitors collection
Definition at line 64 of file Online.php.
00065 { 00066 $this->_getResource()->prepare($this); 00067 return $this; 00068 }
setPrepareAt | ( | $ | time = null |
) |
Set Prepare at timestamp (if time is null, set current timestamp)
int | $time |
Definition at line 86 of file Online.php.
00087 { 00088 if (is_null($time)) { 00089 $time = time(); 00090 } 00091 Mage::app()->saveCache($time, 'log_visitor_online_prepare_at'); 00092 return $this; 00093 }
const XML_PATH_ONLINE_INTERVAL = 'customer/online_customers/online_minutes_interval' |
Definition at line 37 of file Online.php.
const XML_PATH_UPDATE_FREQUENCY = 'log/visitor/online_update_frequency' |
Definition at line 38 of file Online.php.