Set a single option to the Tooltip

@param string $key
@param string $value

@return \SxBootstrap\View\Helper\Bootstrap\Label
@throws Exception\InvalidArgumentException
336787
public function setOption($key, $value)
    {
        if (!in_array($key, $this->availableOptions)) {
            throw new Exception\InvalidArgumentException('Invalid option for Tooltip');
        }

        if (is_bool($value)) {
            $value = $value ? 'true' : 'false';
        }

        if (!is_string($value)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Invalid value for Tooltip, expected boolean or string, got "%s"',
                gettype($value)
            ));
        }

        $this->getElement()->addAttribute("data-$key", $value);

        return $this;
    }
430654
public function attribute($key, $value)
    {
        if (! in_array($key, $this->allowedAttributes)) {
            throw new InvalidArgumentException("Attribute [{$key}] does not exist.");
        }

        $this->attributes[Arr::get($this->aliases, $key, $key)] = $value;

        return $this;
    }
288441
public function setParamByKey($key, $value){

         if( array_key_exists( $key, array_dot( $this->service['param'] ) ) ){

             array_set($this->service['param'], $key, $value);
         }

         return $this;
    }
734781
public function set(string $key, $value): Definition
    {
        $this->data[$key] = $value;

        return $this;
    }
1125888
public function setOptions($key, $value)
    {
        if (isset($this->options[ $key ]))
            $this->options[ $key ] = $value;

        return $this;
    }
106956
public function setOption($name, $value) {
    if (!array_key_exists($name, $this->options)) {
      throw new InvalidArgumentException(sprintf('Undefined option: "%s"', $name));
    }

    $this->options[$name] = $value;
    $this->getHttpClient()->setOption($name, $value);
  }
757117
public function addOption($key, $value)
    {
        $this->options[$key] = $value;
        $this->riakCursor->addOption($key, $value);
        return $this;
    }
1232259
public function setOption($key, $value)
    {
        if (!in_array($key, array_keys($this->defaultOptions))) {
            throw InvalidOptionException::build([], ['option' => $key]);
        }

        $this->options[$key] = $value;
    }
423761
protected function setValue($value)
    {
        if (is_string($value)) {
            $this->value = $value;
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($value). "' for argument 'value' given."
            );
        }

        return $this;
    }
1231772
protected function setOption($key, $value)
    {
        switch ($key) {
            case 'baseUri':
            case 'path':
            case 'extensionBlacklist':
                $this->$key = $value;
                break;
            case 'subdivideHashPathSegment':
                $this->subdivideHashPathSegment = (boolean)$value;
                break;
            default:
                return false;
        }

        return true;
    }
1183006
protected function setValue($value)
    {
        if (!$this->validate($value)) {
            throw new \InvalidArgumentException(sprintf('%s is not a valid value', $value));
        }

        $this->value = $value;
    }
470713
public function set( $key, $value ) {
		$key = $this->addKeyprefixIfNeeded( $key );
		$this->params[$key] = $value;
		return $this;
	}
472480
public function set($key, $value)
    {
        if (! $value instanceof EntityMapperInterface) {
            throw new InvalidArgumentException(
                'Trying to add a non EntityMapper to MappersMap.'
            );
        }
        return parent::set($key, $value);
    }
192100
public function set($key, $value) {
    if ($this->exists($key)) {
      $index = $this->getKeyPosition($key);
      $this->values[$index] = $value;
      return $this;
    }
    return $this->add($key, $value);
  }
1201060
public function option($key, $value = null)
    {
        if (is_null($value)) {
            return $this->options[$key];
        }

        $this->options[$key] = $value;

        return $this;
    }
863549
public function set_label($code, $value)
    {
        if (!array_key_exists($code, $this->labels)) {
            throw new InvalidArgumentException(sprintf('Code %s is not defined', $code));
        }

        $this->labels[$code] = $value;

        return $this;
    }
207059
public function setOption( $key, $value )
	{
		if( isset( $this->options[$key] ) && $this->options[$key] === $value )
			return FALSE;
		$this->options[$key] = $value;
		return TRUE;
	}