public function put(array $values = [])
    {
        $this->qb->setQueryClass(PutItem::class);

        foreach ($values as $attributeName => $value) {
            $value = $this->value($value);

            if ($attributeName !== $this->qb->class->discriminatorAttribute) {
                $attribute     = $this->attr($attributeName);
                $mapping       = $attribute->getMapping();
                $attributeName = $mapping->attributeName;

                $value->setMapping($mapping);
            } else {
                $value->setMapping(null);
            }

            $this->put[$attributeName] = $value->getSerialized();
        }

        return $this->qb;
    }
public function put(array $values = [])
    {
        $this->qb->setQueryClass(PutItem::class);

        foreach ($values as $attributeName => $value) {
            $value = $this->value($value);

            if ($attributeName !== $this->qb->class->discriminatorAttribute) {
                $attribute     = $this->attr($attributeName);
                $mapping       = $attribute->getMapping();
                $attributeName = $mapping->attributeName;

                $value->setMapping($mapping);
            } else {
                $value->setMapping(null);
            }

            $this->put[$attributeName] = $value->getSerialized();
        }

        return $this->qb;
    }
public function put ( array $ values = [ ] ) { $ this -> qb -> setQueryClass ( PutItem :: class ) ; foreach ( $ values as $ attributeName => $ value ) { $ value = $ this -> value ( $ value ) ; if ( $ attributeName !== $ this -> qb -> class -> discriminatorAttribute ) { $ attribute = $ this -> attr ( $ attributeName ) ; $ mapping = $ attribute -> getMapping ( ) ; $ attributeName = $ mapping -> attributeName ; $ value -> setMapping ( $ mapping ) ; } else { $ value -> setMapping ( null ) ; } $ this -> put [ $ attributeName ] = $ value -> getSerialized ( ) ; } return $ this -> qb ; }
Sets the query operation to 'put' and optionally specifies an array of data
to add to the put command.

@param Value[]|mixed[] $values Indexed by attribute name

@return QueryBuilder
Sets the query operation to put and optionally specifies an array of data to add to the put command .