You are here

public function Response::setVary in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Response.php \Symfony\Component\HttpFoundation\Response::setVary()

Sets the Vary header.

Parameters

string|array $headers:

bool $replace Whether to replace the actual value of not (true by default):

Return value

Response

File

vendor/symfony/http-foundation/Response.php, line 979

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function setVary($headers, $replace = true) {
  $this->headers
    ->set('Vary', $headers, $replace);
  return $this;
}