diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Service/Amazon/SimpleDb/Attribute.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Service/Amazon/SimpleDb/Attribute.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,108 @@ +_itemName = $itemName; + $this->_name = $name; + + if (!is_array($values)) { + $this->_values = array($values); + } else { + $this->_values = $values; + } + } + + /** + * Return the item name to which the attribute belongs + * + * @return string + */ + public function getItemName () + { + return $this->_itemName; + } + + /** + * Retrieve attribute values + * + * @return array + */ + public function getValues() + { + return $this->_values; + } + + /** + * Retrieve the attribute name + * + * @return string + */ + public function getName () + { + return $this->_name; + } + + /** + * Add value + * + * @param mixed $value + * @return void + */ + public function addValue($value) + { + if (is_array($value)) { + $this->_values += $value; + } else { + $this->_values[] = $value; + } + } + + public function setValues($values) + { + if (!is_array($values)) { + $values = array($values); + } + $this->_values = $values; + } +}