Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Response.php

function Response::getLastModified

Returns the Last-Modified HTTP header as a DateTime instance.

@final

Throws

\RuntimeException When the HTTP header is not parseable

1 call to Response::getLastModified()
BinaryFileResponse::hasValidIfRangeHeader in vendor/symfony/http-foundation/BinaryFileResponse.php

File

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

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function getLastModified() : ?\DateTimeImmutable {
    return $this->headers
        ->getDate('Last-Modified');
}
RSS feed
Powered by Drupal