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

Breadcrumb

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

function BinaryFileResponse::setAutoLastModified

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

Return value

$this

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

File

vendor/symfony/http-foundation/BinaryFileResponse.php, line 127

Class

BinaryFileResponse
BinaryFileResponse represents an HTTP response delivering a file.

Namespace

Symfony\Component\HttpFoundation

Code

public function setAutoLastModified() : static {
    $this->setLastModified(\DateTimeImmutable::createFromFormat('U', $this->tempFileObject ? time() : $this->file
        ->getMTime()));
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal