You are here

public function MessageTrait::withBody in Lockr 7.3

File

vendor/guzzlehttp/psr7/src/MessageTrait.php, line 132

Class

MessageTrait
Trait implementing functionality common to requests and responses.

Namespace

GuzzleHttp\Psr7

Code

public function withBody(StreamInterface $body) {
  if ($body === $this->stream) {
    return $this;
  }
  $new = clone $this;
  $new->stream = $body;
  return $new;
}