public function MessageTrait::withBody in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-diactoros/src/MessageTrait.php \Zend\Diactoros\MessageTrait::withBody()
- 8 vendor/guzzlehttp/psr7/src/MessageTrait.php \GuzzleHttp\Psr7\MessageTrait::withBody()
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/src/MessageTrait.php \GuzzleHttp\Psr7\MessageTrait::withBody()
File
- vendor/
guzzlehttp/ psr7/ src/ MessageTrait.php, line 128
Class
- MessageTrait
- Trait implementing functionality common to requests and responses.
Namespace
GuzzleHttp\Psr7Code
public function withBody(StreamInterface $body) {
if ($body === $this->stream) {
return $this;
}
$new = clone $this;
$new->stream = $body;
return $new;
}