-
Notifications
You must be signed in to change notification settings - Fork 0
/
OutgoingResponseAware.hh
48 lines (40 loc) · 1.04 KB
/
OutgoingResponseAware.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?hh // partial
// Because of PSR HTTP Message
/**
* @copyright 2010-2015, The Titon Project
* @license http://opensource.org/licenses/bsd-license.php
* @link http://titon.io
*/
namespace Titon\Http;
use Psr\Http\Message\OutgoingResponseInterface;
/**
* Permits a class to interact with an outgoing response object.
*
* @package Titon\Http
*/
trait OutgoingResponseAware {
/**
* Response object.
*
* @var \Psr\Http\Message\OutgoingResponseInterface
*/
protected ?OutgoingResponseInterface $response;
/**
* Return the response object.
*
* @return \Psr\Http\Message\OutgoingResponseInterface
*/
public function getResponse(): ?OutgoingResponseInterface {
return $this->response;
}
/**
* Set the response object.
*
* @param \Psr\Http\Message\OutgoingResponseInterface $response
* @return $this
*/
public function setResponse(OutgoingResponseInterface $response): this {
$this->response = $response;
return $this;
}
}