public function BinaryFileResponse::setAutoLastModified

Automatically sets the Last-Modified header according the file modification date.

1 call to BinaryFileResponse::setAutoLastModified()
BinaryFileResponse::setFile in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php
Sets the file to stream.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php, line 114

Class

BinaryFileResponse
BinaryFileResponse represents an HTTP response delivering a file.

Namespace

Symfony\Component\HttpFoundation

Code

public function setAutoLastModified() {
  $this
    ->setLastModified(\DateTime::createFromFormat('U', $this->file
    ->getMTime()));
  return $this;
}