public function setOption($option, $value)
{
switch ($option) {
case self::OP_HOST_CONNECTION_LIMIT:
$this->options[self::OP_HOST_CONNECTION_LIMIT] = (int) $value;
break;
case self::OP_MS_CONNECT_TIMEOUT:
$this->options[self::OP_MS_CONNECT_TIMEOUT] = $value;
break;
case self::OP_MS_IDLE_TIMEOUT:
$this->options[self::OP_MS_IDLE_TIMEOUT] = (int) $value;
break;
case self::OP_BINDTO:
$this->options[self::OP_BINDTO] = $value;
break;
default:
throw new \DomainException(sprintf('Unknown option: %s', $option));
}
return $this;
}