Пример #1
0
 /**
  * @param $values
  *
  * @return array
  */
 protected function formatAttributes($values)
 {
     $attributes = [];
     foreach ($values as $key => $value) {
         $attributes[$key] = ['Value' => $this->marshaler->marshalValue($value)];
     }
     return $attributes;
 }
Пример #2
0
 /**
  * @param array $record
  * @param bool  $for_update
  *
  * @return mixed
  */
 protected function formatAttributes($record, $for_update = false)
 {
     $marshaler = new Marshaler();
     if ($for_update) {
         if (is_array($record)) {
             foreach ($record as $key => &$value) {
                 $value = ['Action' => 'PUT', 'Value' => $marshaler->marshalValue($value)];
             }
             return $record;
         }
     }
     return $marshaler->marshalItem($record);
 }