Mage_Reports_Model_Mysql4_Entity_Summary_Collection_Abstract Class Reference

Inheritance diagram for Mage_Reports_Model_Mysql4_Entity_Summary_Collection_Abstract:

Varien_Data_Collection

List of all members.

Public Member Functions

 setSelectPeriod ($periodType, $customStart=null, $customEnd=null)
 setDatePeriod ($period)
 setStoreFilter ($storeId)
 getCollection ()

Protected Member Functions

 _initCollection ()

Protected Attributes

 $_entityCollection


Detailed Description

Definition at line 35 of file Abstract.php.


Member Function Documentation

_initCollection (  )  [protected]

Definition at line 126 of file Abstract.php.

00127     {
00128         return $this;
00129     }

getCollection (  ) 

Return collection for summaries

Returns:
Mage_Eav_Model_Entity_Collection_Abstract

Definition at line 118 of file Abstract.php.

00119     {
00120         if (empty($this->_entityCollection)) {
00121             $this->_initCollection();
00122         }
00123         return $this->_entityCollection;
00124     }

setDatePeriod ( period  ) 

Definition at line 103 of file Abstract.php.

00104     {
00105 
00106     }

setSelectPeriod ( periodType,
customStart = null,
customEnd = null 
)

Loads and calculates summaries

Parameters:
boolean $printQuery
boolean $logQuery
Returns:
Varien_Data_Collection Filters the summaries by some period
Parameters:
string $periodType
string|int|null $customStart
string|int|null $customEnd
Returns:
Varien_Data_Collection

Definition at line 64 of file Abstract.php.

00065     {
00066         switch ($periodType) {
00067             case "24h":
00068                 $customStart = time()-24*60*60;
00069                 $customEnd   = time();
00070                 break;
00071 
00072             case "7d":
00073                 $customStart = time()-7*24*60*60;
00074                 $customEnd   = time();
00075                 break;
00076 
00077             case "30d":
00078                 $customStart = time()-30*24*60*60;
00079                 $customEnd   = time();
00080                 break;
00081 
00082             case "1y":
00083                 $customStart = time()-365*24*60*60;
00084                 $customEnd   = time();
00085                 break;
00086 
00087             default:
00088                 if(is_string($customStart)) {
00089                     $customStart = strtotime($customStart);
00090                 }
00091                 if(is_string($customEnd)) {
00092                     $customEnd = strtotime($customEnd);
00093                 }
00094                 break;
00095 
00096         }
00097 
00098 
00099         return $this;
00100     }

setStoreFilter ( storeId  ) 

Definition at line 108 of file Abstract.php.

00109     {
00110         return $this;
00111     }


Member Data Documentation

$_entityCollection [protected]

Definition at line 42 of file Abstract.php.


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

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