Should implement partial update
@param string|int $item
@param mixed $data
324826
protected function handlePatch($item, $data)
    {
        PWELogger::debug($_SERVER['REQUEST_METHOD'] . ": %s %s", $item, $data);
        throw new HTTP5xxException('Not supported method for this call: ' . $_SERVER['REQUEST_METHOD'], HTTP5xxException::UNIMPLEMENTED);
    }
678068
public function process(DOMElement $node, Item $item)
    {
        foreach ($this->keys as $key) {
            $item->setExtra($key, $this->getValue($node, $key));
        }
    }
829940
private function renderItem($item)
    {
        $this->response = $this->response->withBody(stream_for($this->getRenderedItem($item)));
    }
1255226
public function add ($item) {
        if (!$this->getConnection ()->getClient ()->sadd ($this->name , $item)) {
            return false;
        }
        $this->_data = null;
        $this->_count = null;
        return true;
    }
218526
public function addItem(Item $item)
    {
        if (!$this->items->contains($item)) {
            $this->items->add($item);
            $item->addLabel($this);
        }

        return $this;
    }
704434
def update(self, item, dry_run=None):
        """"""
        logger.debug('Updating item. Item: {item} Path: {data_file}'.format(
            item=item,
            data_file=self.data_file
        ))
        self.delete(item, dry_run=dry_run)
        return self.create(item, dry_run=dry_run)
182701
public function set(DataItem $item): void
    {
        $command = [
            'command' => 'set',
            'key' => $item->key,
            'body' => $item->value,
            'metadata.*' => ''
        ];
        $metadataAsArray = $item->metadata->toArray();
        foreach ($metadataAsArray as $name => $value) {
            $command['metadata.' . $name] = $value;
        }
        $this->execute([$command]);
    }
613863
private function doGetAction($repository, $item)
    {
        $this->output->writeln($this->serialize($repository->get($item)));
    }
531095
public function put($key, $item)
    {
        $file = $this->filename($key);

        // json
        // text
        if (!file_put_contents($file, serialize($item))) {
            throw new \Exception(
                t("Failed writing cache object '!key'.", [
                    '!key' => $key
                ])
            );
        }
    }
1276120
public function setItem(Item $item)
    {
        $this->childOf = $item->id;
        $this->_item = $item;
        
        return $this;
    }
296020
public function writeItem($item)
    {
        if ($this->autoDetectHeader && !$this->header) {
            $this->handleAutoDetectHeader($item);
        }

        $this->table->addRow(
            $this->getValues($item, $this->getKeys($item))
        );
    }
137590
protected function createItem(Model $item, $data)
    {
        $this->beforeAssignData($item, $data);
        $item->assign($data, null, $this->whitelistCreate());
        $this->afterAssignData($item, $data);

        $this->beforeSave($item);
        $this->beforeCreate($item);

        $success = $item->create();

        if ($success) {

            $this->afterCreate($item);
            $this->afterSave($item);
        }

        return $success ? $item : null;
    }
988088
public function add_item( $item ) {
		if ( is_array( $item ) ) {
			foreach ( $item as $single_item ) {
				$this->add_item( $single_item );
			}
		} else {
			$priority                   = $item->get_priority();
			$this->items[ $priority ][] = $item;
		}
	}
945644
public function remove ($item) {
        if (!$this->getConnection ()->getClient ()->srem ($this->name , $item)) {
            return false;
        }
        $this->_data = null;
        $this->_count = null;
        return true;
    }
1264634
public function setItem(Item $item)
    {
        if ($this->item !== $item) {
            $this->item = $item->setType($this);
        }

        return $this;
    }
300542
public function updateByPrimaryKey($key, array $data)
    {
        $this->updateByField($this->entity->getPrimaryKey(), $key, $data);
    }
751681
private function doSetAction(Repository $repository, $item)
    {
        if (!$this->hasArgument('value')) {
            $this->output->error('A value must be provided when using the "set" action.');
        }

        $value = $this->argument('value');
        $repository->save($item, $this->unserialize($value));
    }