public function appendContent($key, $value)
    {
        if ($this->content === null) {
            $this->content = array();
        }

        if (!is_array($this->content)) {
            throw new \InvalidArgumentException('Cannot append response content: Current content is not an array !');
        }

        $this->content[(string) $key] = $value;

        return $this;
    }
public function appendContent($key, $value)
    {
        if ($this->content === null) {
            $this->content = array();
        }

        if (!is_array($this->content)) {
            throw new \InvalidArgumentException('Cannot append response content: Current content is not an array !');
        }

        $this->content[(string) $key] = $value;

        return $this;
    }
public function appendContent ( $ key , $ value ) { if ( $ this -> content === null ) { $ this -> content = array ( ) ; } if ( ! is_array ( $ this -> content ) ) { throw new \ InvalidArgumentException ( 'Cannot append response content: Current content is not an array !' ) ; } $ this -> content [ ( string ) $ key ] = $ value ; return $ this ; }
Append content for the response.

@param  string $key
@param  mixed  $value
@return self
@throws \InvalidArgumentException
Append content for the response .