1 | <?php |
||
10 | class Headers implements Arrayable, \Iterator |
||
11 | { |
||
12 | /** @var Map */ |
||
13 | private $headers; |
||
14 | |||
15 | 7 | public function __construct($contents = []) |
|
19 | |||
20 | 7 | private function parse($contents) |
|
30 | |||
31 | 6 | public function toArray() |
|
35 | |||
36 | 1 | public function size() |
|
40 | |||
41 | /** |
||
42 | * Returns whether a header with the given name exists. |
||
43 | * |
||
44 | * @param string $header |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | 1 | public function has($header) |
|
52 | |||
53 | /** |
||
54 | * Returns whether the given header exists. |
||
55 | * |
||
56 | * @param Header $header |
||
57 | * |
||
58 | * @return bool |
||
59 | */ |
||
60 | 1 | public function contains(Header $header) |
|
64 | |||
65 | /** |
||
66 | * Returns the header info for the given code. |
||
67 | * |
||
68 | * @param string $header |
||
69 | * |
||
70 | * @return Header |
||
71 | */ |
||
72 | 1 | public function get($header) |
|
76 | |||
77 | /** |
||
78 | * Sets the header. |
||
79 | * |
||
80 | * @param Header $header |
||
81 | */ |
||
82 | 1 | public function add(Header $header) |
|
86 | |||
87 | /** |
||
88 | * Removes the given header. |
||
89 | * |
||
90 | * @param string $header |
||
91 | */ |
||
92 | 1 | public function remove($header) |
|
96 | |||
97 | public function current() |
||
101 | |||
102 | public function key() |
||
106 | |||
107 | public function next() |
||
111 | |||
112 | public function rewind() |
||
116 | |||
117 | public function valid() |
||
121 | } |
||
122 |