/** * @test */ public function connectToLocalhostByDefault() { $cluster = new Cluster(); $this->assertEquals("http", $cluster->getProtocol()); $this->assertEquals("localhost", $cluster->getDomain()); $this->assertEquals("8098", $cluster->getPort()); }
/** * @param \Kbrw\RiakBundle\Model\Cluster\Cluster $cluster * @return array<string,string> */ public function getConfig($cluster) { $config = array(); $config["protocol"] = $cluster->getProtocol(); $config["domain"] = $cluster->getDomain(); $config["port"] = $cluster->getPort(); return $config; }
/** * @param \Kbrw\RiakBundle\Model\Cluster\Cluster $cluster * @param \Kbrw\RiakBundle\Model\Bucket\Bucket $bucket * @param \Kbrw\RiakBundle\Model\Search\Query $query * @return array<string,string> */ public function getConfig($cluster, $bucket, $query) { $config = $query->getConfig(); $config["protocol"] = $cluster->getProtocol(); $config["domain"] = $cluster->getDomain(); $config["port"] = $cluster->getPort(); $config["bucket"] = $bucket->getName(); return $config; }
/** * @param \Kbrw\RiakBundle\Model\Cluster\Cluster $cluster * @return array<string,string> */ public function getConfig($cluster, $buckets = null) { $config = array(); $config["protocol"] = $cluster->getProtocol(); $config["domain"] = $cluster->getDomain(); $config["port"] = $cluster->getPort(); $config["buckets"] = $buckets; return $config; }
/** * @param \Kbrw\RiakBundle\Model\Cluster\Cluster $cluster * @param \Kbrw\RiakBundle\Model\Bucket\Bucket $bucket * @return array<string,string> */ public function getConfig($cluster, $bucket, $r = null, $w = null, $dw = null) { $config = array(); $config["protocol"] = $cluster->getProtocol(); $config["domain"] = $cluster->getDomain(); $config["port"] = $cluster->getPort(); $config["bucket"] = $bucket->getName(); $config["r"] = $r; $config["w"] = $w; $config["dw"] = $dw; return $config; }
/** * @param \Kbrw\RiakBundle\Model\Cluster\Cluster $cluster * @param \Kbrw\RiakBundle\Model\Bucket\Bucket $bucket * @return array<string,string> */ public function getConfig($cluster, $bucketName, $keys = "stream", $props = false) { $config = array(); $config["protocol"] = $cluster->getProtocol(); $config["domain"] = $cluster->getDomain(); $config["port"] = $cluster->getPort(); $config["bucket"] = $bucketName; $config["keys"] = $keys; $config["props"] = $props ? "true" : null; return $config; }