1 | <?php |
||
13 | class HttpFieldCollection |
||
14 | { |
||
15 | /** |
||
16 | * @var HttpField[] |
||
17 | */ |
||
18 | protected $httpFields; |
||
19 | |||
20 | /** |
||
21 | * HttpFieldCollection constructor. |
||
22 | 5 | * @param HttpField[] $httpFields |
|
23 | */ |
||
24 | 5 | public function __construct(array $httpFields = []) |
|
31 | |||
32 | /** |
||
33 | * @param HttpField $obj |
||
34 | */ |
||
35 | public function add(HttpField $obj): void |
||
39 | |||
40 | /** |
||
41 | * @param string $key |
||
42 | 2 | * @throws HttpFieldNotFoundOnCollection |
|
43 | */ |
||
44 | 2 | public function delete(string $key): void |
|
49 | |||
50 | /** |
||
51 | * @param string $key |
||
52 | * @return HttpField |
||
53 | 1 | * @throws HttpFieldNotFoundOnCollection |
|
54 | */ |
||
55 | 1 | public function get(string $key): HttpField |
|
60 | |||
61 | /** |
||
62 | * @param $key |
||
63 | 3 | * @throws HttpFieldNotFoundOnCollection |
|
64 | */ |
||
65 | 3 | private function checkKeyExists($key): void |
|
71 | |||
72 | /** |
||
73 | * @param array $httpFields |
||
74 | 2 | * @return self |
|
75 | */ |
||
76 | 2 | public static function fromHttpFieldArray(array $httpFields): self |
|
80 | } |