1 | <?php |
||
5 | class Response |
||
6 | { |
||
7 | /** @var int */ |
||
8 | protected $statusCode = 200; |
||
9 | |||
10 | /** @var array */ |
||
11 | protected $headers = []; |
||
12 | |||
13 | /** |
||
14 | * Get the status code. |
||
15 | * |
||
16 | * @return int |
||
17 | */ |
||
18 | public function statusCode() |
||
22 | |||
23 | /** |
||
24 | * Set the status code. |
||
25 | * |
||
26 | * @param int $statusCode |
||
27 | * |
||
28 | * @return self |
||
29 | */ |
||
30 | public function code($statusCode) |
||
36 | |||
37 | /** |
||
38 | * Return HTTP headers. |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | public function getHeaders() |
||
46 | |||
47 | /** |
||
48 | * Set one HTTP header. |
||
49 | * |
||
50 | * @param string $key |
||
51 | * @param string $value |
||
52 | * |
||
53 | * @return self |
||
54 | */ |
||
55 | public function header($key, $value) |
||
61 | |||
62 | /** |
||
63 | * Set multiple headers at once. |
||
64 | * |
||
65 | * @param array $headers |
||
66 | * |
||
67 | * @return self |
||
68 | */ |
||
69 | public function headers($headers) |
||
77 | } |
||
78 |