Mage_Log_Model_Visitor_Online Class Reference

Inheritance diagram for Mage_Log_Model_Visitor_Online:

Mage_Core_Model_Abstract Varien_Object

List of all members.

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 ()


Detailed Description

Definition at line 35 of file Online.php.


Member Function Documentation

_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

Returns:
Mage_Log_Model_Mysql4_Visitor_Online

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)

Returns:
int

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

Returns:
int

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

Returns:
int

Definition at line 100 of file Online.php.

00101     {
00102         return Mage::getStoreConfig(self::XML_PATH_UPDATE_FREQUENCY);
00103     }

prepare (  ) 

Prepare Online visitors collection

Returns:
Mage_Log_Model_Visitor_Online

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)

Parameters:
int $time
Returns:
Mage_Log_Model_Mysql4_Visitor_Online

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     }


Member Data Documentation

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.


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

Generated on Sat Jul 4 17:24:29 2009 for Magento by  doxygen 1.5.8