public function setOptions($options)
    {
        if (!is_array($options) && !$options instanceof \Traversable) {
            throw new \InvalidArgumentException(sprintf(
                    'Parameter provided to %s must be an array or Traversable',
                    __METHOD__
            ));
        }
    
        foreach ($options as $key => $value){
            $this->setOption($key, $value);
        }
         
        return $this;
    }