
Public Member Functions | |
| setSelectPeriod ($periodType, $customStart=null, $customEnd=null) | |
| setDatePeriod ($period) | |
| setStoreFilter ($storeId) | |
| getCollection () | |
Protected Member Functions | |
| _initCollection () | |
Protected Attributes | |
| $_entityCollection | |
Definition at line 35 of file Abstract.php.
| _initCollection | ( | ) | [protected] |
| getCollection | ( | ) |
Return collection for summaries
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 | ) |
| setSelectPeriod | ( | $ | periodType, | |
| $ | customStart = null, |
|||
| $ | customEnd = null | |||
| ) |
Loads and calculates summaries
| boolean | $printQuery | |
| boolean | $logQuery |
| string | $periodType | |
| string|int|null | $customStart | |
| string|int|null | $customEnd |
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 | ) |
$_entityCollection [protected] |
Definition at line 42 of file Abstract.php.
1.5.8