Clue\React\Buzz\Message\MessageFactory::body PHP 메소드

body() 공개 메소드

Creates a new instance of StreamInterface for the given body contents
public body ( React\Stream\ReadableStreamInterface | string $body ) : StreamInterface
$body React\Stream\ReadableStreamInterface | string
리턴 StreamInterface
    public function body($body)
    {
        if ($body instanceof ReadableStreamInterface) {
            return new ReadableBodyStream($body);
        }
        return RingCentral\Psr7\stream_for($body);
    }