Exemple #1
0
 /**
  * Add a Header\Interface to this container, for raw values see {@link addHeaderLine()} and {@link addHeaders()}
  *
  * @param  Header\HeaderInterface $header
  * @return Headers
  */
 public function addHeader(Header\HeaderInterface $header)
 {
     $key = $this->normalizeFieldName($header->getFieldName());
     $this->headersKeys[] = $key;
     $this->headers[] = $header;
     if ($this->getEncoding() !== 'ASCII') {
         $header->setEncoding($this->getEncoding());
     }
     return $this;
 }