Permalink
Browse files

add attribute methods to product

  • Loading branch information...
1 parent 5b326b0 commit 9b6049fa2a336e474e569a5c84b2a96ea98c7f2a @iampersistent iampersistent committed Mar 11, 2013
Showing with 48 additions and 38 deletions.
  1. +38 −38 lib/Vespolina/Entity/Product/BaseProduct.php
  2. +10 −0 lib/Vespolina/Entity/Product/BaseProductInterface.php
@@ -39,44 +39,7 @@
protected $taxonomies;
protected $type;
protected $updatedAt;
- protected $pricingSet = array();
-
- /**
- * @param $pricingSet
- * @return array
- */
- public function setPricing(PricingSetInterface $pricingSet)
- {
- $this->pricingSet = $pricingSet;
-
- return $this;
- }
-
- /**
- * @return array $priceSet
- */
- public function getPricing()
- {
- return $this->pricingSet;
- }
-
- /**
- * @inheritdoc
- */
- public function setDescription($description)
- {
- $this->description = $description;
-
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function getDescription()
- {
- return $this->description;
- }
+ protected $pricingSet;
/**
* @inheritdoc
@@ -160,6 +123,24 @@ public function setAttributes($attributes)
/**
* @inheritdoc
*/
+ public function setDescription($description)
+ {
+ $this->description = $description;
+
+ return $this;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * @inheritdoc
+ */
public function addIdentifierSet($index, $identifierSet)
{
$this->identifierSets[$index] = $identifierSet;
@@ -262,6 +243,25 @@ public function getOptions()
}
/**
+ * @param $pricingSet
+ * @return array
+ */
+ public function setPricing(PricingSetInterface $pricingSet)
+ {
+ $this->pricingSet = $pricingSet;
+
+ return $this;
+ }
+
+ /**
+ * @return array $priceSet
+ */
+ public function getPricing()
+ {
+ return $this->pricingSet;
+ }
+
+ /**
* @inheritdoc
*/
public function getIdentifierSets()
@@ -36,6 +36,16 @@ function setDescription($description);
function getDescription();
/**
+ *
+ */
+ function addAttribute(AttributeInterface $attribute);
+
+ /**
+ *
+ */
+ function addAttributes(array $attributes);
+
+ /**
* Remove all features from the product
*/
function clearAttributes();

0 comments on commit 9b6049f

Please sign in to comment.