public function setCurlOpt($opt, $val)
    {
        if (!is_int($opt))
        {
            throw new \InvalidArgumentException(sprintf(
                '%s::setCurlOpt - Argument 1 expected to be integer, %s seen.',
                get_class($this),
                gettype($opt)
            ));
        }

        $this->curlOpts[$opt] = $val;
        return $this;
    }