public function setHosts($hosts) {
		$this->hosts = [];

		if (! $hosts instanceof Traversable && ! is_array($hosts)) {
			throw new Exceptions\OptionsError('Hosts data must be an array or a traversable');
		}

		foreach ($hosts as $name => $host) {
			if (is_int($name)) {
				$this->addHost($host);
				continue;
			}
			
			$this->addHost($host, $name);
		}
		
		return $this;
	}
public function setHosts($hosts) {
		$this->hosts = [];

		if (! $hosts instanceof Traversable && ! is_array($hosts)) {
			throw new Exceptions\OptionsError('Hosts data must be an array or a traversable');
		}

		foreach ($hosts as $name => $host) {
			if (is_int($name)) {
				$this->addHost($host);
				continue;
			}
			
			$this->addHost($host, $name);
		}
		
		return $this;
	}
public function setHosts ( $ hosts ) { $ this -> hosts = [ ] ; if ( ! $ hosts instanceof Traversable && ! is_array ( $ hosts ) ) { throw new Exceptions \ OptionsError ( 'Hosts data must be an array or a traversable' ) ; } foreach ( $ hosts as $ name => $ host ) { if ( is_int ( $ name ) ) { $ this -> addHost ( $ host ) ; continue ; } $ this -> addHost ( $ host , $ name ) ; } return $ this ; }
Set the hosts of the connection pool

@param  array | Traversable $hosts
@throws Exceptions\OptionsError
@return MongoAdapter
Set the hosts of the connection pool