PATH:
home
/
lab2454c
/
healthvalidate.com
/
vendor
/
php-http
/
message
/
src
/
Decorator
<?php namespace Http\Message\Decorator; use Psr\Http\Message\ResponseInterface; /** * @author Márk Sági-Kazár <mark.sagikazar@gmail.com> */ trait ResponseDecorator { use MessageDecorator { getMessage as getResponse; } /** * Exchanges the underlying response with another. * * @return self */ public function withResponse(ResponseInterface $response) { $new = clone $this; $new->message = $response; return $new; } /** * {@inheritdoc} */ public function getStatusCode() { return $this->message->getStatusCode(); } /** * {@inheritdoc} */ public function withStatus($code, $reasonPhrase = '') { $new = clone $this; $new->message = $this->message->withStatus($code, $reasonPhrase); return $new; } /** * {@inheritdoc} */ public function getReasonPhrase() { return $this->message->getReasonPhrase(); } }
[+]
..
[-] MessageDecorator.php
[edit]
[-] RequestDecorator.php
[edit]
[-] StreamDecorator.php
[edit]
[-] ResponseDecorator.php
[edit]