protected function hosts(array $hosts) { foreach ($hosts as $host) { $hostCollection[] = $host->host . ':' . $host->port; } $this->setHosts(array_unique($hostCollection)); return $this; }