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