/**
  * @return \Riak\Client\Core\Message\Bucket\GetRequest
  */
 private function createGetRequest()
 {
     $request = new GetRequest();
     $request->type = $this->namespace->getBucketType();
     $request->bucket = $this->namespace->getBucketName();
     return $request;
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function jsonSerialize()
 {
     $index = $this->indexName;
     $criteria = $this->criteria ? $this->criteria->jsonSerialize() : [];
     $bucket = !$this->namespace->isDefaultType() ? [$this->namespace->getBucketType(), $this->namespace->getBucketName()] : $this->namespace->getBucketName();
     return array_merge(['bucket' => $bucket, 'index' => $index], $criteria);
 }
 /**
  * @return \Riak\Client\Core\Message\Kv\ListKeysRequest
  */
 private function createRequest()
 {
     $request = new ListKeysRequest();
     $request->type = $this->namespace->getBucketType();
     $request->bucket = $this->namespace->getBucketName();
     $request->timeout = $this->timeout;
     return $request;
 }
 /**
  * @return \Riak\Client\Core\Message\Bucket\PutRequest
  */
 private function createGetRequest()
 {
     $request = new PutRequest();
     $request->type = $this->namespace->getBucketType();
     $request->bucket = $this->namespace->getBucketName();
     foreach ($this->properties as $name => $value) {
         $request->{$name} = $value;
     }
     return $request;
 }
Exemple #5
0
 /**
  * {@inheritdoc}
  */
 public function jsonSerialize()
 {
     $filters = $this->filters ?: [];
     $bucket = !$this->namespace->isDefaultType() ? [$this->namespace->getBucketType(), $this->namespace->getBucketName()] : $this->namespace->getBucketName();
     return ['bucket' => $bucket, 'key_filters' => $filters];
 }