original_string: public function setOption($name, $value = null)
      {
          // Set options
          if (is_array($name)) {
              foreach ($name as $k => $v) {
                  $this->setOption($k, $v);
              }
              return $this;
          }
  
          if (method_exists($this, $method = 'set' . $name)) {
              return $this->$method($value);
          } else {
              $this->$name = $value;
              return $this;
          }
      }
code: public function setOption($name, $value = null)
      {
          // Set options
          if (is_array($name)) {
              foreach ($name as $k => $v) {
                  $this->setOption($k, $v);
              }
              return $this;
          }
  
          if (method_exists($this, $method = 'set' . $name)) {
              return $this->$method($value);
          } else {
              $this->$name = $value;
              return $this;
          }
      }
code_tokens: public function setOption ( $ name , $ value = null ) { // Set options if ( is_array ( $ name ) ) { foreach ( $ name as $ k => $ v ) { $ this -> setOption ( $ k , $ v ) ; } return $ this ; } if ( method_exists ( $ this , $ method = 'set' . $ name ) ) { return $ this -> $ method ( $ value ) ; } else { $ this -> $ name = $ value ; return $ this ; } }
docstring: Set option property value
  
  @param string|array $name
  @param mixed $value
  @return $this
docstring_tokens: Set option property value