1 | <?php |
||
23 | class HeaderBag extends SymfonyHeaderBag |
||
24 | { |
||
25 | /** |
||
26 | * The request this bag belongs to. |
||
27 | * |
||
28 | * @var RequestInterface |
||
29 | */ |
||
30 | protected $request; |
||
31 | |||
32 | /** |
||
33 | * Constructs a `HeaderBag` instance. |
||
34 | * |
||
35 | * @param array $headers |
||
36 | * @param RequestInterface $request |
||
37 | */ |
||
38 | public function __construct(array $headers, RequestInterface $request) |
||
43 | |||
44 | /** |
||
45 | * Removes a header. |
||
46 | * |
||
47 | * @param string $key |
||
48 | */ |
||
49 | public function remove($key) |
||
54 | |||
55 | /** |
||
56 | * Sets a header by name. |
||
57 | * |
||
58 | * @param string $key |
||
59 | * @param string|array $values |
||
60 | * @param bool $replace |
||
61 | */ |
||
62 | public function set($key, $values, $replace = true) |
||
67 | |||
68 | /** |
||
69 | * Updates the headers in the associated request. |
||
70 | */ |
||
71 | protected function updateRequest() |
||
82 | } |
||
83 |