Phly\Http\MessageTrait::withBody PHP Метод

withBody() публичный Метод

The body MUST be a StreamInterface object. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return a new instance that has the new body stream.
public withBody ( Psr\Http\Message\StreamInterface $body ) : self
$body Psr\Http\Message\StreamInterface Body.
Результат self
    public function withBody(StreamInterface $body)
    {
        $new = clone $this;
        $new->stream = $body;
        return $new;
    }