public function removeInterest($interest)
 {
     $updateSetBuilder = (new Riak\Command\Builder\UpdateSet($this->riak))->remove($interest);
     $response = (new Riak\Command\Builder\UpdateMap($this->riak))->atLocation($this->location)->updateSet('interests', $updateSetBuilder)->withParameter('returnbody', 'true')->withContext($this->data->getContext())->build()->execute();
     if ($response->isSuccess()) {
         $this->data = $response->getMap();
     }
     return $this;
 }
Exemple #2
0
 public function testType()
 {
     $this->assertEquals('map', Map::TYPE);
     $crdt = new Map([], '');
     $this->assertEquals('map', $crdt->getType());
 }