/**
  * Put Attributes 
  * The PutAttributes operation creates or replaces attributes within an item. You specify new attributes
  * using a combination of the Attribute.X.Name and Attribute.X.Value parameters. You specify
  * the first attribute by the parameters Attribute.0.Name and Attribute.0.Value, the second
  * attribute by the parameters Attribute.1.Name and Attribute.1.Value, and so on.
  * Attributes are uniquely identified within an item by their name/value combination. For example, a single
  * item can have the attributes { "first_name", "first_value" } and { "first_name",
  * second_value" }. However, it cannot have two attribute instances where both the Attribute.X.Name and
  * Attribute.X.Value are the same.
  * Optionally, the requestor can supply the Replace parameter for each individual value. Setting this value
  * to true will cause the new attribute value to replace the existing attribute value(s). For example, if an
  * item has the attributes { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requestor does a
  * PutAttributes of { 'b', '4' } with the Replace parameter set to true, the final attributes of the
  * item will be { 'a', '1' } and { 'b', '4' }, replacing the previous values of the 'b' attribute
  * with the new value.
  *   
  * @see http://docs.amazonwebservices.com/AmazonSimpleDB/2009-04-15/DeveloperGuide/SDB_API_PutAttributes.html      
  * @param mixed $request array of parameters for Amazon_SimpleDB_Model_PutAttributes request or Amazon_SimpleDB_Model_PutAttributes object itself
  * @see Amazon_SimpleDB_Model_PutAttributes
  * @return Amazon_SimpleDB_Model_PutAttributesResponse Amazon_SimpleDB_Model_PutAttributesResponse
  *
  * @throws Amazon_SimpleDB_Exception
  */
 public function putAttributes($request)
 {
     require_once 'Amazon/SimpleDB/Model/PutAttributesResponse.php';
     return Amazon_SimpleDB_Model_PutAttributesResponse::fromXML($this->_invoke('PutAttributes'));
 }
Example #2
0
 /**
  * Put Attributes 
  * The PutAttributes operation creates or replaces attributes within an item. You specify new attributes
  * using a combination of the Attribute.X.Name and Attribute.X.Value parameters. You specify
  * the first attribute by the parameters Attribute.0.Name and Attribute.0.Value, the second
  * attribute by the parameters Attribute.1.Name and Attribute.1.Value, and so on.
  * Attributes are uniquely identified within an item by their name/value combination. For example, a single
  * item can have the attributes { "first_name", "first_value" } and { "first_name",
  * second_value" }. However, it cannot have two attribute instances where both the Attribute.X.Name and
  * Attribute.X.Value are the same.
  * Optionally, the requestor can supply the Replace parameter for each individual value. Setting this value
  * to true will cause the new attribute value to replace the existing attribute value(s). For example, if an
  * item has the attributes { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requestor does a
  * PutAttributes of { 'b', '4' } with the Replace parameter set to true, the final attributes of the
  * item will be { 'a', '1' } and { 'b', '4' }, replacing the previous values of the 'b' attribute
  * with the new value.
  * 
  * @see http://docs.amazonwebservices.com/AmazonSimpleDB/2009-04-15/DeveloperGuide/SDB_API_PutAttributes.html
  * @param mixed $request array of parameters for Amazon_SimpleDB_Model_PutAttributesRequest request
  * or Amazon_SimpleDB_Model_PutAttributesRequest object itself
  * @see Amazon_SimpleDB_Model_PutAttributes
  * @return Amazon_SimpleDB_Model_PutAttributesResponse Amazon_SimpleDB_Model_PutAttributesResponse
  *
  * @throws Amazon_SimpleDB_Exception
  */
 public function putAttributes($request)
 {
     if (!$request instanceof Amazon_SimpleDB_Model_PutAttributesRequest) {
         require_once 'Amazon/SimpleDB/Model/PutAttributesRequest.php';
         $request = new Amazon_SimpleDB_Model_PutAttributesRequest($request);
     }
     require_once 'Amazon/SimpleDB/Model/PutAttributesResponse.php';
     return Amazon_SimpleDB_Model_PutAttributesResponse::fromXML($this->_invoke($this->_convertPutAttributes($request)));
 }
 /**
  * This will perform a parallelized request to put all of the objects.
  * 
  * @param Array		$actions	This is an array of Amazon_SimpleDB_Model_PutAttributes objects.
  * 
  * @return Array	This is an array of Amazon_SimpleDB_Model_PutAttributesResponse objects.
  */
 public function putAttributes($actions)
 {
     if (!is_array($actions)) {
         throw new Exception("Parameter supplied to " . __FUNCTION__ . " is not an array.");
     }
     require_once 'Amazon/SimpleDB/Model/PutAttributesResponse.php';
     $parameters = array();
     foreach ($actions as $action) {
         $parameters[] = $this->_convertPutAttributes($action);
     }
     $results = $this->_invoke($parameters);
     $objects = array();
     foreach ($results as $result) {
         if ($result != "") {
             $objects[] = Amazon_SimpleDB_Model_PutAttributesResponse::fromXML($result);
         }
     }
     return $objects;
 }