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;
	}