Mage_Rating_Model_Rating_Option Class Reference

Inheritance diagram for Mage_Rating_Model_Rating_Option:

Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getResource ()
 getResourceCollection ()
 load ($optionId)
 save ()
 delete ()
 addVote ()
 setId ($id)
 getId ()
 getCollection ()


Detailed Description

Definition at line 34 of file Option.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 36 of file Option.php.

00037     {
00038         parent::__construct();
00039     }


Member Function Documentation

addVote (  ) 

Definition at line 69 of file Option.php.

00070     {
00071         $this->getResource()->addVote($this);
00072         return $this;
00073     }

delete (  ) 

Definition at line 63 of file Option.php.

00064     {
00065         $this->getResource()->delete($this);
00066         return $this;
00067     }

getCollection (  ) 

Definition at line 86 of file Option.php.

00087     {
00088         return Mage::getResourceModel('rating/rating_option_collection');
00089     }

getId (  ) 

Retrieve object id

Returns:
mixed

Reimplemented from Varien_Object.

Definition at line 81 of file Option.php.

00082     {
00083         return $this->getOptionId();
00084     }

getResource (  ) 

Definition at line 41 of file Option.php.

00042     {
00043         return Mage::getResourceModel('rating/rating_option');
00044     }

getResourceCollection (  ) 

Definition at line 46 of file Option.php.

00047     {
00048         return Mage::getResourceModel('rating/rating_option_collection');
00049     }

load ( optionId  ) 

Definition at line 51 of file Option.php.

00052     {
00053         $this->setData($this->getResource()->load($optionId));
00054         return $this;
00055     }

save (  ) 

Definition at line 57 of file Option.php.

00058     {
00059         $this->getResource()->save($this);
00060         return $this;
00061     }

setId ( value  ) 

Set object id field value

Parameters:
mixed $value
Returns:
Varien_Object

Reimplemented from Varien_Object.

Definition at line 75 of file Option.php.

00076     {
00077         $this->setOptionId($id);
00078         return $this;
00079     }


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