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;
        }
    }
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;
        }
    }
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 ; } }
Set option property value

@param string|array $name
@param mixed $value
@return $this
Set option property value