protected function setAutoLastModified(): void
    {
        $date = DateTime::createFromFormat('U', (string) $this->file->getMTime());
        $date = DateTimeImmutable::createFromMutable($date);
        $date = $date->setTimezone(new \DateTimeZone('UTC'));

        $this->headers['Last-Modified']     = [$date->format('D, d M Y H:i:s') . ' GMT'];
        $this->headerNames['last-modified'] = 'Last-Modified';
    }
protected function setAutoLastModified(): void
    {
        $date = DateTime::createFromFormat('U', (string) $this->file->getMTime());
        $date = DateTimeImmutable::createFromMutable($date);
        $date = $date->setTimezone(new \DateTimeZone('UTC'));

        $this->headers['Last-Modified']     = [$date->format('D, d M Y H:i:s') . ' GMT'];
        $this->headerNames['last-modified'] = 'Last-Modified';
    }
protected function setAutoLastModified ( ) : void { $ date = DateTime :: createFromFormat ( 'U' , ( string ) $ this -> file -> getMTime ( ) ) ; $ date = DateTimeImmutable :: createFromMutable ( $ date ) ; $ date = $ date -> setTimezone ( new \ DateTimeZone ( 'UTC' ) ) ; $ this -> headers [ 'Last-Modified' ] = [ $ date -> format ( 'D, d M Y H:i:s' ) . ' GMT' ] ; $ this -> headerNames [ 'last-modified' ] = 'Last-Modified' ; }
Automatically sets the Last-Modified header according the file modification date.

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