You are here

public function Message::withBody in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Message::withBody()

Return an instance with the specified message body.

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.

Parameters

StreamInterface $body Body.:

Return value

self

Throws

\InvalidArgumentException When the body is not valid.

Overrides MessageInterface::withBody

File

vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php, line 85

Class

Message
Message.

Namespace

Symfony\Bridge\PsrHttpMessage\Tests\Fixtures

Code

public function withBody(StreamInterface $body) {
  throw new \BadMethodCallException('Not implemented.');
}