original_string: public function setOptions($options)
      {
          if (!is_array($options) && !$options instanceof Traversable) {
              throw new Exception\InvalidArgumentException(sprintf(
                  '"%s" expects an array or Traversable; received "%s"',
                  __METHOD__,
                  (is_object($options) ? get_class($options) : gettype($options))
              ));
          }
  
          foreach ($options as $key => $value) {
              if ($key == 'options') {
                  $key = 'adapterOptions';
              }
              $method = 'set' . ucfirst($key);
              if (method_exists($this, $method)) {
                  $this->$method($value);
              }
          }
          return $this;
      }
code: public function setOptions($options)
      {
          if (!is_array($options) && !$options instanceof Traversable) {
              throw new Exception\InvalidArgumentException(sprintf(
                  '"%s" expects an array or Traversable; received "%s"',
                  __METHOD__,
                  (is_object($options) ? get_class($options) : gettype($options))
              ));
          }
  
          foreach ($options as $key => $value) {
              if ($key == 'options') {
                  $key = 'adapterOptions';
              }
              $method = 'set' . ucfirst($key);
              if (method_exists($this, $method)) {
                  $this->$method($value);
              }
          }
          return $this;
      }
code_tokens: public function setOptions ( $ options ) { if ( ! is_array ( $ options ) && ! $ options instanceof Traversable ) { throw new Exception \ InvalidArgumentException ( sprintf ( '"%s" expects an array or Traversable; received "%s"' , __METHOD__ , ( is_object ( $ options ) ? get_class ( $ options ) : gettype ( $ options ) ) ) ) ; } foreach ( $ options as $ key => $ value ) { if ( $ key == 'options' ) { $ key = 'adapterOptions' ; } $ method = 'set' . ucfirst ( $ key ) ; if ( method_exists ( $ this , $ method ) ) { $ this -> $ method ( $ value ) ; } } return $ this ; }
docstring: Set filter setate
  
  @param  array $options
  @throws Exception\InvalidArgumentException if options is not an array or Traversable
  @return self
docstring_tokens: Set filter setate