public function setHeader($header, $value)
    {
        $value = !is_array($value) ? array($value) : array_map('trim', $value);

        $name = strtolower($header);

        $this->headers[$name] = $value;

        foreach(array_keys($this->headerLines) as $key)
            if(strtolower($key) == $name)
                unset($this->headerLines[$key]);

        $this->headerLines[$header] = $value;

        return $this;
    }
public function setHeader($header, $value)
    {
        $value = !is_array($value) ? array($value) : array_map('trim', $value);

        $name = strtolower($header);

        $this->headers[$name] = $value;

        foreach(array_keys($this->headerLines) as $key)
            if(strtolower($key) == $name)
                unset($this->headerLines[$key]);

        $this->headerLines[$header] = $value;

        return $this;
    }
public function setHeader ( $ header , $ value ) { $ value = ! is_array ( $ value ) ? array ( $ value ) : array_map ( 'trim' , $ value ) ; $ name = strtolower ( $ header ) ; $ this -> headers [ $ name ] = $ value ; foreach ( array_keys ( $ this -> headerLines ) as $ key ) if ( strtolower ( $ key ) == $ name ) unset ( $ this -> headerLines [ $ key ] ) ; $ this -> headerLines [ $ header ] = $ value ; return $ this ; }
Set header as if it's new
@param string $header
@param array|string $value
@return $this
Set header as if it s new