public function addInterests(array $interests) { $updateSetBuilder = new Riak\Command\Builder\UpdateSet($this->riak); foreach ($interests as $interest) { $updateSetBuilder->add($interest); } $response = (new Riak\Command\Builder\UpdateMap($this->riak))->atLocation($this->location)->updateSet('interests', $updateSetBuilder)->withParameter('returnbody', 'true')->build()->execute(); if ($response->isSuccess()) { $this->data = $response->getMap(); } return $this; }
/** * Tests validate properly verifies the Bucket is not there * * @dataProvider getLocalNodeConnection * * @param $riak \Basho\Riak * * @expectedException \Basho\Riak\Command\Builder\Exception */ public function testValidateBucket($riak) { $builder = new Command\Builder\UpdateSet($riak); $builder->add('some_element'); $command = $builder->build(); }