You are here

public function Response::setPrivate in Zircon Profile 8

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

Marks the response as "private".

It makes the response ineligible for serving other clients.

Return value

Response

1 call to Response::setPrivate()
Response::setCache in vendor/symfony/http-foundation/Response.php
Sets the response's cache headers (validation and/or expiration).

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function setPrivate() {
  $this->headers
    ->removeCacheControlDirective('public');
  $this->headers
    ->addCacheControlDirective('private');
  return $this;
}