protected function resolveConflict($id, $vClock, array $objectList)
    {
        // Our approach here is last-write wins
        $winner = $objectList[count($objectList) - 1];

        $putInput = new Input\PutInput();
        $putInput->setVClock($vClock);

        $mergedObject = new RiakObject($id);
        $mergedObject->setContent($winner->getContent());

        $this->bucket->put($mergedObject, $putInput);

        return $mergedObject;
    }
protected function resolveConflict($id, $vClock, array $objectList)
    {
        // Our approach here is last-write wins
        $winner = $objectList[count($objectList) - 1];

        $putInput = new Input\PutInput();
        $putInput->setVClock($vClock);

        $mergedObject = new RiakObject($id);
        $mergedObject->setContent($winner->getContent());

        $this->bucket->put($mergedObject, $putInput);

        return $mergedObject;
    }
protected function resolveConflict ( $ id , $ vClock , array $ objectList ) { // Our approach here is last-write wins $ winner = $ objectList [ count ( $ objectList ) - 1 ] ; $ putInput = new Input \ PutInput ( ) ; $ putInput -> setVClock ( $ vClock ) ; $ mergedObject = new RiakObject ( $ id ) ; $ mergedObject -> setContent ( $ winner -> getContent ( ) ) ; $ this -> bucket -> put ( $ mergedObject , $ putInput ) ; return $ mergedObject ; }
On-read conflict resolution. Applied approach here is last write wins.
Specific needs may override this method to apply alternate conflict resolutions.

{@internal Riak does not attempt to resolve a write conflict, and store
it as sibling of conflicted one. By following this approach, it is up to
the next read to resolve the conflict. When this happens, your fetched
object will have a list of siblings (read as a list of objects).
In our specific case, we do not care about the intermediate ones since
they are all the same read from storage, and we do apply a last sibling
(last write) wins logic.
If by any means our resolution generates another conflict, it'll up to
next read to properly solve it.}

@param string $id
@param string $vClock
@param array  $objectList

@return RiakObject
On - read conflict resolution . Applied approach here is last write wins . Specific needs may override this method to apply alternate conflict resolutions .