Mage_GiftRegistry_Model_Mysql4_Gift_Collection Class Reference

Inheritance diagram for Mage_GiftRegistry_Model_Mysql4_Gift_Collection:

Mage_Core_Model_Mysql4_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 addCustomerFilter ($customer)

Protected Member Functions

 _construct ()


Detailed Description

Definition at line 35 of file Collection.php.


Member Function Documentation

_construct (  )  [protected]

Initialization here

Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.

Definition at line 37 of file Collection.php.

00038     {
00039         $this->_init('giftregistry/gift');
00040     }

addCustomerFilter ( customer  ) 

Definition at line 42 of file Collection.php.

00043     {
00044         if ($customer instanceof Mage_Customer_Model_Customer) {
00045             $this->addFieldToFilter('customer_id', $customer->getId());
00046         }
00047         elseif (is_numeric($customer)) {
00048             $this->addFieldToFilter('customer_id', $customer);
00049         }
00050         elseif (is_array($customer)){
00051             $this->addFieldToFilter('customer_id', $customer);
00052         }
00053         else {
00054             Mage::throwException(
00055                 Mage::helper('giftregistry/test')->__('Invalid parameter for customer filter')
00056             );
00057         }
00058 
00059         return $this;
00060     }


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

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