| 1 | <?php declare(strict_types=1); |
||
| 16 | class Result extends BaseResult |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | private $headers; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param array $data |
||
| 25 | * @param array $headers |
||
| 26 | */ |
||
| 27 | 3 | public function __construct(array $data = [], array $headers = []) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Get all headers of the result. |
||
| 35 | * |
||
| 36 | * @return array |
||
| 37 | */ |
||
| 38 | 2 | public function getHeaders() |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Check if the result has a header by name. |
||
| 45 | * |
||
| 46 | * @param string $name |
||
| 47 | * |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | 2 | public function hasHeader($name) |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Get an header of the result by name. |
||
| 57 | * |
||
| 58 | * @param string $name |
||
| 59 | * |
||
| 60 | * @return mixed|null |
||
| 61 | */ |
||
| 62 | 2 | public function getHeader($name) |
|
| 70 | } |
||
| 71 |