Basho\Riak\Node\Builder::buildLocalhost PHP Method

buildLocalhost() public method

Build multiple node objects configured with the same host address but different ports. Commonly used in development environments where you have multiple Riak nodes on a single machine / vm.
public buildLocalhost ( array $ports = [8087] ) : Node[]
$ports array
return Basho\Riak\Node[]
    public function buildLocalhost(array $ports = [8087])
    {
        $nodes = [];
        $this->atHost('localhost');
        foreach ($ports as $port) {
            $nodes[] = $this->onPort($port)->build();
        }
        return $nodes;
    }