1 | <?php |
||
10 | class Headers extends AbstractModel implements Arrayable, \Iterator { |
||
11 | |||
12 | /** @var Map */ |
||
13 | private $headers; |
||
14 | |||
15 | 8 | public function __construct($contents = []) { |
|
18 | |||
19 | 8 | private function parse($contents) { |
|
28 | |||
29 | 8 | public function toArray() { |
|
32 | |||
33 | 1 | public function size() { |
|
36 | |||
37 | /** |
||
38 | * Returns whether a header with the given name exists |
||
39 | * |
||
40 | * @param string $header |
||
41 | * @return bool |
||
42 | */ |
||
43 | 1 | public function has($header) { |
|
46 | |||
47 | /** |
||
48 | * Returns whether the given header exists |
||
49 | * |
||
50 | * @param Header $header |
||
51 | * @return bool |
||
52 | */ |
||
53 | 1 | public function contains(Header $header) { |
|
56 | |||
57 | /** |
||
58 | * Returns the header info for the given code |
||
59 | * |
||
60 | * @param string $header |
||
61 | * @return Header |
||
62 | */ |
||
63 | 1 | public function get($header) { |
|
66 | |||
67 | /** |
||
68 | * Sets the header |
||
69 | * |
||
70 | * @param Header $header |
||
71 | */ |
||
72 | 1 | public function add(Header $header) { |
|
75 | |||
76 | /** |
||
77 | * Sets all headers from another headers collection. Will overwrite existing ones. |
||
78 | * |
||
79 | * @param Headers $headers |
||
80 | */ |
||
81 | public function addAll(Headers $headers) { |
||
86 | |||
87 | /** |
||
88 | * Removes the given header |
||
89 | * |
||
90 | * @param string $header |
||
91 | */ |
||
92 | 1 | public function remove($header) { |
|
95 | |||
96 | public function current() { |
||
99 | |||
100 | public function key() { |
||
103 | |||
104 | public function next() { |
||
107 | |||
108 | public function rewind() { |
||
111 | |||
112 | public function valid() { |
||
115 | } |
||
116 |