/**
  * @param string                              $name
  * @param \Kbrw\RiakBundle\Model\Bucket\Props $props
  */
 public function __construct($name = null, $props = null)
 {
     if (!isset($props)) {
         $props = new Props();
     }
     $props->setName($name);
     $this->setProps($props);
 }
<?php

use Kbrw\RiakBundle\Model\Bucket\Props;
$object = new Props("retailer");
$object->setR("quorum");
$object->setW("quorum");
$object->setDw("quorum");
$object->setRw("quorum");
 /**
  * @return boolean
  */
 public function isSearchIndexingEnabled()
 {
     return $this->props->hasPreCommitHook(ErlangCall::getErlangCallUsedToIndexData());
 }
 public function __construct($name = null, $protocol = null, $domain = null, $port = null, $clientId = null, $maxParallelCalls = null, $bucketConfigs = array(), $guzzleClientProviderService = null, $eventDispatcher = null, $riakClusterServiceClient = null, $riakBucketServiceClient = null, $riakKVServiceClient = null, $riakSearchServiceClient = null, $riakMapReduceServiceClient = null, $riakStatusServiceClient = null)
 {
     if (!isset($name)) {
         $name = self::DEFAULT_NAME;
     }
     if (!isset($protocol)) {
         $protocol = self::DEFAULT_PROTOCOL;
     }
     if (!isset($domain)) {
         $domain = self::DEFAULT_DOMAIN;
     }
     if (!isset($port)) {
         $port = self::DEFAULT_PORT;
     }
     if (!isset($clientId)) {
         $clientId = self::DEFAULT_CLIENT_ID;
     }
     if (!isset($maxParallelCalls)) {
         $maxParallelCalls = self::DEFAULT_MAX_PARALLEL_CALLS;
     }
     $this->setName($name);
     $this->setProtocol($protocol);
     $this->setDomain($domain);
     $this->setPort($port);
     $this->setClientId($clientId);
     $this->setMaxParallelCalls($maxParallelCalls);
     $this->setGuzzleClientProviderService($guzzleClientProviderService);
     $this->setEventDispatcher($eventDispatcher);
     $this->setRiakClusterServiceClient($riakClusterServiceClient);
     $this->setRiakBucketServiceClient($riakBucketServiceClient);
     $this->setRiakKVServiceClient($riakKVServiceClient);
     $this->setRiakSearchServiceClient($riakSearchServiceClient);
     $this->setRiakMapReduceServiceClient($riakMapReduceServiceClient);
     $this->setRiakStatusServiceClient($riakStatusServiceClient);
     $this->buckets = array();
     foreach ($bucketConfigs as $bucketName => $bucketConfig) {
         $class = isset($bucketConfig["class"]) ? $bucketConfig["class"] : "\\Kbrw\\RiakBundle\\Model\\Bucket\\Bucket";
         $bucket = new $class();
         $bucket->setName($bucketName);
         $bucket->setFormat($bucketConfig["format"]);
         $bucket->setFullyQualifiedClassName($bucketConfig["fqcn"]);
         $props = new Props($bucketName);
         $props->setR($bucketConfig["r"]);
         $props->setW($bucketConfig["w"]);
         $props->setRw($bucketConfig["rw"]);
         $props->setDw($bucketConfig["dw"]);
         $bucket->setProps($props);
         $this->addBucket($bucket);
     }
 }