original_string: public function toHeaderValue()
      {
          $value = $this->value;
          if ($this->isExpanded) {
              $value = $this->_flatten($this->value);
          }
          $headerValue[] = sprintf('%s=%s', $this->name, rawurlencode($value));
  
          if ($this->expiresAt) {
              $headerValue[] = sprintf('expires=%s', $this->getFormattedExpires());
          }
          if ($this->path !== '') {
              $headerValue[] = sprintf('path=%s', $this->path);
          }
          if ($this->domain !== '') {
              $headerValue[] = sprintf('domain=%s', $this->domain);
          }
          if ($this->secure) {
              $headerValue[] = 'secure';
          }
          if ($this->httpOnly) {
              $headerValue[] = 'httponly';
          }
  
          return implode('; ', $headerValue);
      }
code: public function toHeaderValue()
      {
          $value = $this->value;
          if ($this->isExpanded) {
              $value = $this->_flatten($this->value);
          }
          $headerValue[] = sprintf('%s=%s', $this->name, rawurlencode($value));
  
          if ($this->expiresAt) {
              $headerValue[] = sprintf('expires=%s', $this->getFormattedExpires());
          }
          if ($this->path !== '') {
              $headerValue[] = sprintf('path=%s', $this->path);
          }
          if ($this->domain !== '') {
              $headerValue[] = sprintf('domain=%s', $this->domain);
          }
          if ($this->secure) {
              $headerValue[] = 'secure';
          }
          if ($this->httpOnly) {
              $headerValue[] = 'httponly';
          }
  
          return implode('; ', $headerValue);
      }
code_tokens: public function toHeaderValue ( ) { $ value = $ this -> value ; if ( $ this -> isExpanded ) { $ value = $ this -> _flatten ( $ this -> value ) ; } $ headerValue [ ] = sprintf ( '%s=%s' , $ this -> name , rawurlencode ( $ value ) ) ; if ( $ this -> expiresAt ) { $ headerValue [ ] = sprintf ( 'expires=%s' , $ this -> getFormattedExpires ( ) ) ; } if ( $ this -> path !== '' ) { $ headerValue [ ] = sprintf ( 'path=%s' , $ this -> path ) ; } if ( $ this -> domain !== '' ) { $ headerValue [ ] = sprintf ( 'domain=%s' , $ this -> domain ) ; } if ( $ this -> secure ) { $ headerValue [ ] = 'secure' ; } if ( $ this -> httpOnly ) { $ headerValue [ ] = 'httponly' ; } return implode ( '; ' , $ headerValue ) ; }
docstring: Returns a header value as string
  
  @return string
docstring_tokens: Returns a header value as string