original_string: public function setOption($option, $value = null)
      {
          if (is_array($option)) { // If it's an array, loop through each option and call this method recursively.
              foreach ($option as $opt => $val) {
                  $this->setOption($opt, $val);
              }
              return;
          }
  
          if (array_key_exists($option, $this->defaults)) { // If it is a default value.
              throw new ProtectedOptionException(sprintf('Unable to set protected option #%u', $option));
          }
  
          if (curl_setopt($this->handle, $option, $value) === false) {
              throw new CurlErrorException(sprintf('Couldn\'t set option #%u', $option));
          }
      }
code: public function setOption($option, $value = null)
      {
          if (is_array($option)) { // If it's an array, loop through each option and call this method recursively.
              foreach ($option as $opt => $val) {
                  $this->setOption($opt, $val);
              }
              return;
          }
  
          if (array_key_exists($option, $this->defaults)) { // If it is a default value.
              throw new ProtectedOptionException(sprintf('Unable to set protected option #%u', $option));
          }
  
          if (curl_setopt($this->handle, $option, $value) === false) {
              throw new CurlErrorException(sprintf('Couldn\'t set option #%u', $option));
          }
      }
code_tokens: public function setOption ( $ option , $ value = null ) { if ( is_array ( $ option ) ) { // If it's an array, loop through each option and call this method recursively. foreach ( $ option as $ opt => $ val ) { $ this -> setOption ( $ opt , $ val ) ; } return ; } if ( array_key_exists ( $ option , $ this -> defaults ) ) { // If it is a default value. throw new ProtectedOptionException ( sprintf ( 'Unable to set protected option #%u' , $ option ) ) ; } if ( curl_setopt ( $ this -> handle , $ option , $ value ) === false ) { throw new CurlErrorException ( sprintf ( 'Couldn\'t set option #%u' , $ option ) ) ; } }
docstring: Set an option for the request.
  
  @param  mixed            $option
  @param  mixed            $value  null
  @return RequestInterface
docstring_tokens: Set an option for the request .