public function setOptions($options = array())
    {
        if ($options instanceof Traversable) {
            $options = ArrayUtils::iteratorToArray($options);
        }

        if (!is_array($options)) {
            throw new \Exception('Config parameter is not a valid');
        }

        foreach ($options as $key => $value) {
            $this->options[$key] = $value;
        }

        return $this;
    }