public function append($name, $content)
    {
        if (!is_string($name)) {
            throw new \Exception('Invalid body segment key ("' . gettype($name) . '")');
        }

        if (isset($this->_body[$name])) {
            unset($this->_body[$name]);
        }

        $this->_body[$name] = (string) $content;
        return $this;
    }
public function append($name, $content)
    {
        if (!is_string($name)) {
            throw new \Exception('Invalid body segment key ("' . gettype($name) . '")');
        }

        if (isset($this->_body[$name])) {
            unset($this->_body[$name]);
        }

        $this->_body[$name] = (string) $content;
        return $this;
    }
public function append ( $ name , $ content ) { if ( ! is_string ( $ name ) ) { throw new \ Exception ( 'Invalid body segment key ("' . gettype ( $ name ) . '")' ) ; } if ( isset ( $ this -> _body [ $ name ] ) ) { unset ( $ this -> _body [ $ name ] ) ; } $ this -> _body [ $ name ] = ( string ) $ content ; return $ this ; }
Append a named body segment to the body content array

If segment already exists, replaces with $content and places at end of
array.

@param string $name
@param string $content
@return \G4\Http\Response
Append a named body segment to the body content array