You are here

public function Response::setPublic in Zircon Profile 8.0

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

Marks the response as "public".

It makes the response eligible for serving other clients.

Return value

Response

3 calls to Response::setPublic()
BinaryFileResponse::__construct in vendor/symfony/http-foundation/BinaryFileResponse.php
Constructor.
Response::setCache in vendor/symfony/http-foundation/Response.php
Sets the response's cache headers (validation and/or expiration).
Response::setSharedMaxAge in vendor/symfony/http-foundation/Response.php
Sets the number of seconds after which the response should no longer be considered fresh by shared caches.

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

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