1 | <?php |
||
14 | class Headers implements \ArrayAccess, \IteratorAggregate |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Array containing response headers. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $headers = array(); |
||
23 | |||
24 | /** |
||
25 | * Class constructor. |
||
26 | * |
||
27 | * @param array $headers |
||
28 | */ |
||
29 | public function __construct(array $headers) |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | * |
||
39 | * @param string $offset |
||
40 | * @return boolean |
||
41 | */ |
||
42 | public function offsetExists($offset) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | * |
||
50 | * @param string $offset |
||
51 | * @return string|null |
||
52 | */ |
||
53 | public function offsetGet($offset) |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | * |
||
67 | * @param string $offset |
||
68 | * @param string $value |
||
69 | * @throws \Exception |
||
70 | */ |
||
71 | public function offsetSet($offset, $value) |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | * |
||
79 | * @param string $offset |
||
80 | * @throws \Exception |
||
81 | */ |
||
82 | public function offsetUnset($offset) |
||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | * |
||
90 | * @return \ArrayObject |
||
91 | */ |
||
92 | public function getIterator() |
||
96 | } |
||
97 |