Mage_Review_Model_Mysql4_Review_Summary_Collection Class Reference

Inheritance diagram for Mage_Review_Model_Mysql4_Review_Summary_Collection:

Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 __construct ()
 addEntityFilter ($entityId, $entityType=1)
 addStoreFilter ($storeId)

Protected Attributes

 $_summaryTable


Detailed Description

Definition at line 34 of file Collection.php.


Constructor & Destructor Documentation

__construct (  ) 

Reimplemented from Varien_Data_Collection.

Definition at line 38 of file Collection.php.

00039     {
00040         $resources = Mage::getSingleton('core/resource');
00041         $this->_setIdFieldName('primary_id');
00042 
00043         parent::__construct($resources->getConnection('review_read'));
00044         $this->_summaryTable = $resources->getTableName('review/review_aggregate');
00045 
00046         $this->_select->from($this->_summaryTable);
00047 
00048         $this->setItemObjectClass(Mage::getConfig()->getModelClassName('review/review_summary'));
00049     }


Member Function Documentation

addEntityFilter ( entityId,
entityType = 1 
)

Definition at line 51 of file Collection.php.

00052     {
00053         $this->_select->where('entity_pk_value IN(?)', $entityId)
00054             ->where('entity_type = ?', $entityType);
00055         return $this;
00056     }

addStoreFilter ( storeId  ) 

Definition at line 58 of file Collection.php.

00059     {
00060         $this->_select->where('store_id = ?', $storeId);
00061         return $this;
00062     }


Member Data Documentation

$_summaryTable [protected]

Definition at line 36 of file Collection.php.


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

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