original_string: public function setHeader($key, $value = null, $toLower = true)
      {
          if (is_array($key)) {
              foreach ($key as $k => $v) {
                  $this->setHeader($k, $v);
              }
          } else {
              if ($toLower === true) {
                  $key = strtolower($key);
              }
              if ($value === null) {
                  unset($this->_headers[$key]);
              } else {
                  $this->_headers[$key] = $value;
              }
          }
      }
code: public function setHeader($key, $value = null, $toLower = true)
      {
          if (is_array($key)) {
              foreach ($key as $k => $v) {
                  $this->setHeader($k, $v);
              }
          } else {
              if ($toLower === true) {
                  $key = strtolower($key);
              }
              if ($value === null) {
                  unset($this->_headers[$key]);
              } else {
                  $this->_headers[$key] = $value;
              }
          }
      }
code_tokens: public function setHeader ( $ key , $ value = null , $ toLower = true ) { if ( is_array ( $ key ) ) { foreach ( $ key as $ k => $ v ) { $ this -> setHeader ( $ k , $ v ) ; } } else { if ( $ toLower === true ) { $ key = strtolower ( $ key ) ; } if ( $ value === null ) { unset ( $ this -> _headers [ $ key ] ) ; } else { $ this -> _headers [ $ key ] = $ value ; } } }
docstring: Set http header or headers
  @param mixed $key string key or key-value pairs to set multiple headers.
  @param string $value the header value when key is string, set null to remove header.
  @param boolean $toLower convert key to lowercase
docstring_tokens: Set http header or headers