You are here

public function Response::expire in Zircon Profile 8

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

Marks the response stale by setting the Age header to be equal to the maximum age of the response.

Return value

Response

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function expire() {
  if ($this
    ->isFresh()) {
    $this->headers
      ->set('Age', $this
      ->getMaxAge());
  }
  return $this;
}