protected function withHeaderLogic($name, $value, $add)
    {
        $this->assertHeaderName($name);
        $this->assertHeaderValue($value);
        $this->assertHeadersNotSent();
        
        foreach ((array)$value as $val) {
            $this->header("{$name}: {$val}", !$add);
        }
        
        return $this;
    }
protected function withHeaderLogic($name, $value, $add)
    {
        $this->assertHeaderName($name);
        $this->assertHeaderValue($value);
        $this->assertHeadersNotSent();
        
        foreach ((array)$value as $val) {
            $this->header("{$name}: {$val}", !$add);
        }
        
        return $this;
    }
protected function withHeaderLogic ( $ name , $ value , $ add ) { $ this -> assertHeaderName ( $ name ) ; $ this -> assertHeaderValue ( $ value ) ; $ this -> assertHeadersNotSent ( ) ; foreach ( ( array ) $ value as $ val ) { $ this -> header ( "{$name}: {$val}" , ! $ add ) ; } return $ this ; }
Abstraction for `withHeader` and `withAddedHeader`

@param string $name Case-insensitive header field name.
@param string|string[] $value Header value(s).
@param boolean $add
@return static
@throws \InvalidArgumentException for invalid header names or values.
@throws \RuntimeException if headers are already sent
Abstraction for withHeader and withAddedHeader