public function add(string $name, string $value): HeaderCollection
    {
        $name = trim(strtolower($name));
        if (!array_key_exists($name, $this->headers)) {
            $this->headers[$name] = new Header($name);
        }
        $this->headers[$name]->addValue($value);
        return $this;
    }
public function add(string $name, string $value): HeaderCollection
    {
        $name = trim(strtolower($name));
        if (!array_key_exists($name, $this->headers)) {
            $this->headers[$name] = new Header($name);
        }
        $this->headers[$name]->addValue($value);
        return $this;
    }
public function add ( string $ name , string $ value ) : HeaderCollection { $ name = trim ( strtolower ( $ name ) ) ; if ( ! array_key_exists ( $ name , $ this -> headers ) ) { $ this -> headers [ $ name ] = new Header ( $ name ) ; } $ this -> headers [ $ name ] -> addValue ( $ value ) ; return $ this ; }
Add a value to a header

@param string $name The name of the header
@param string $value A value for the header. Multiple values can be added to a header.
@return HeaderCollection
Add a value to a header