src/DataStore/src/DataStore/Cacheable.php
public function update($itemData, $createIfAbsent = false)
    {
        if ($createIfAbsent) {
            trigger_error("Option 'createIfAbsent' is no more use.", E_DEPRECATED);
        }

        if (method_exists($this->dataSource, "update")) {
            return $this->dataSource->update($itemData, $createIfAbsent);
        } else {
            throw new DataStoreException("Refreshable don't haw method update");
        }
    }
public function update($itemData, $createIfAbsent = false)
    {
        if ($createIfAbsent) {
            trigger_error("Option 'createIfAbsent' is no more use.", E_DEPRECATED);
        }

        if (method_exists($this->dataSource, "update")) {
            return $this->dataSource->update($itemData, $createIfAbsent);
        } else {
            throw new DataStoreException("Refreshable don't haw method update");
        }
    }
public function update ( $ itemData , $ createIfAbsent = false ) { if ( $ createIfAbsent ) { trigger_error ( "Option 'createIfAbsent' is no more use." , E_DEPRECATED ) ; } if ( method_exists ( $ this -> dataSource , "update" ) ) { return $ this -> dataSource -> update ( $ itemData , $ createIfAbsent ) ; } else { throw new DataStoreException ( "Refreshable don't haw method update" ) ; } }
By default, update existing Item.

If item with PrimaryKey == $item["id"] is existing in store, item will update.
Fields which don't present in $item will not change in item in store.<br>
Method will return updated item<br>
<br>
If $item["id"] isn't set - method will throw exception.<br>
<br>
If item with PrimaryKey == $item["id"] is absent - method  will throw exception,<br>
but if $createIfAbsent = true item will be created and method return inserted item<br>
<br>

@param array $itemData associated array with PrimaryKey
@param bool $createIfAbsent
@return array updated item or inserted item
@throws DataStoreException
By default update existing Item .