public function setBody($body)
    {
        if ($body instanceof StreamInterface) {
            $this->_body = $body;
        } else {
            $this->_body = new Stream('php://memory', 'rw+');
        }
    }
public function setBody($body)
    {
        if ($body instanceof StreamInterface) {
            $this->_body = $body;
        } else {
            $this->_body = new Stream('php://memory', 'rw+');
        }
    }
public function setBody ( $ body ) { if ( $ body instanceof StreamInterface ) { $ this -> _body = $ body ; } else { $ this -> _body = new Stream ( 'php://memory' , 'rw+' ) ; } }
Sets the body of the message.

@param $body
Sets the body of the message .