Assign a response entity body

@param null|string|callable|Body $body
@throws \InvalidArgumentException
@return Response Returns the current object instance
491840
public function setBody(Body $body)
    {
        $this->body = $body;
        $this->setAllHeaders($body->getHeaders());
        $this->setStatus($body->getStatusCode());

        return $this;
    }
105271
public function setBody($body = '')
    {
        $this->body = $body;
        $this->debug->debug(__FUNCTION__, 'setBody: ', $this->body);
    }
1263564
private function createJsonBody(&$body) 
    {
        if ($body && $this->method != self::GET) {
            return GuzzleHttp\json_encode($body);
        }
        
        return;
    }
565892
public function setUserBody($isBody = FALSE)
    {
        $this->isBody = $isBody;
        $this->debug->info(__FUNCTION__, 'setUserBody: ', $this->referrer);

        return $this;
    }
874892
public function setBody($body)
    {
        $this->code = array(new CodeLineGenerator($body, $this->getIndentationLevel(), $this->getIndentationString()));

        return $this;
    }
1016194
public function setBody($body) {
    if (is_array($body) || is_object($body))
      $this->body = (object) $body;
    else
      $this->body = $body;
    return $this;
  }
108652
public function withBody(StreamInterface $body)
    {
        $request = clone $this;
        if (method_exists($request, 'setContent')) {
            $request->setContent($body);
        } else {
            $request->content = $body;
        }

        return $request;
    }
440845
protected function setBody($body = null)
    {
        if (is_string($body) || is_null($body)) {
            $this->body = $body;
        } elseif (is_object($body) && method_exists($body, '__toString')) {
            $this->body = $body->__toString();
        } else {
            $this->body = json_encode($body);
            $this->setHeader('Content-Type', 'application/json');
        }
    }
1140751
protected function setBody($body = 'php://temp')
    {
        if (is_string($body) || is_resource($body)) {
            $body = new Stream($body, 'w+b');
        }
        if (! $body instanceof StreamInterface) {
            throw new InvalidArgumentException(sprintf(
                'Invalid body provided. Must be a string resource identifier, or resource, '
                . 'or instance of Psr\Http\Message\StreamInterface; received "%s".',
                is_object($body) ? get_class($body) : gettype($body)
            ));
        }
        $this->setBodyInstance($body);

        return $this;
    }
259836
protected function setBody($body = null)
    {
        parent::setBody($body);

        if (is_array($body) || is_object($body)) {
            $this->post = (array) $body;
        } else {
            $this->post = [];
        }
    }
932054
public static function create($body = ''): StreamInterface
    {
        if ($body instanceof StreamInterface) {
            return $body;
        }

        if (\is_string($body)) {
            $resource = \fopen('php://temp', 'rw+');
            \fwrite($resource, $body);
            $body = $resource;
        }

        if (\is_resource($body)) {
            $new = new self();
            $new->stream = $body;
            $meta = \stream_get_meta_data($new->stream);
            $new->seekable = $meta['seekable'];
            $new->readable = isset(self::READ_WRITE_HASH['read'][$meta['mode']]);
            $new->writable = isset(self::READ_WRITE_HASH['write'][$meta['mode']]);
            $new->uri = $new->getMetadata('uri');

            return $new;
        }

        throw new \InvalidArgumentException('First argument to Stream::create() must be a string, resource or StreamInterface.');
    }
1240751
public function _request($body)
    {
        if(isset($body['params'])){
            $response = $this->client->send($this->client->request(0, $body['method'], $body['params']));
        } else {
            $response = $this->client->send($this->client->request(0, $body['method']));
        }
        $response = json_decode($response->getBody());
        // if there is an error, return the error message otherwise respond with result
        if(property_exists($response, 'error')){
            return json_encode($response->error);
        } else {
            return json_encode($response->result);
        }
    }
708716
public static function make( $name, array $body )
    {
        /** @var AbstractResponseFormatter $obj */
        $obj = null;

        list( $type, $method ) = explode( '/', $name );

        if ( !is_null( $obj = static::create( $type ) ) ) {
            return $obj->{$method}( $body );
        }

        return $body;
    }
1289494
public function setBody($body)
    {
        if (!$this->checkFixedArray($body, 3, true)) {
            throw new InvalidResponseException($this->command, $body);
        }
        foreach (array_slice($body, 2) as $node) {
            if (!$this->checkFixedArray($node, 4)) {
                throw new InvalidResponseException($this->command, $body);
            }
        }
        parent::setBody($body);
    }
468391
public function createDocBlock($body = NULL) {
    $block = new DocBlock($body);
    $this->setDocBlock($block);
    return $block;
  }
57377
public function body($body = null)
    {
        if ($body === null) {
            $body = $this->getBody();

            return $body ? $body->__toString() : '';
        }
        if (is_array($body)) {
            $formData = new FormData();
            $formData->addMany($body);
            $this->addHeaders(['Content-Type' => $formData->contentType()]);
            $body = (string)$formData;
        }
        $stream = new Stream('php://memory', 'rw');
        $stream->write($body);
        $this->stream = $stream;

        return $this;
    }
785662
public final function withBody(StreamInterface $body): MessageInterface
   {
       if (!$body->getMetadata("uri")) {
           throw new InvalidArgumentException(
               "Can't get instance for body: invalid stream");
       }
       return $this->with("body", $body);
   }