| @@ 77-85 (lines=9) @@ | ||
| 74 | { |
|
| 75 | @trigger_error('The '.__METHOD__.' method is deprecated since version 1.2 and will be removed in 2.0. Use the TagHandler instead.', E_USER_DEPRECATED); |
|
| 76 | ||
| 77 | if (!$replace && $response->headers->has($this->getTagsHeader())) { |
|
| 78 | $header = $response->headers->get($this->getTagsHeader()); |
|
| 79 | if ('' !== $header) { |
|
| 80 | $tags = array_merge( |
|
| 81 | explode(',', $response->headers->get($this->getTagsHeader())), |
|
| 82 | $tags |
|
| 83 | ); |
|
| 84 | } |
|
| 85 | } |
|
| 86 | ||
| 87 | $uniqueTags = array_unique($tags); |
|
| 88 | $response->headers->set($this->getTagsHeader(), implode(',', $uniqueTags)); |
|
| @@ 31-36 (lines=6) @@ | ||
| 28 | */ |
|
| 29 | public function tagResponse(Response $response, $replace = false) |
|
| 30 | { |
|
| 31 | if (!$replace && $response->headers->has($this->getTagsHeaderName())) { |
|
| 32 | $header = $response->headers->get($this->getTagsHeaderName()); |
|
| 33 | if ('' !== $header) { |
|
| 34 | $this->addTags(explode(',', $response->headers->get($this->getTagsHeaderName()))); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| 38 | if ($this->hasTags()) { |
|
| 39 | $response->headers->set($this->getTagsHeaderName(), $this->getTagsHeaderValue()); |
|