src/web/Response.php
public function setLastModifiedHeader(string $path)
    {
        $modifiedTime = filemtime($path);

        if ($modifiedTime) {
            $this->getHeaders()->set('Last-Modified', gmdate('D, d M Y H:i:s', $modifiedTime) . ' GMT');
        }

        return $this;
    }
public function setLastModifiedHeader(string $path)
    {
        $modifiedTime = filemtime($path);

        if ($modifiedTime) {
            $this->getHeaders()->set('Last-Modified', gmdate('D, d M Y H:i:s', $modifiedTime) . ' GMT');
        }

        return $this;
    }
public function setLastModifiedHeader ( string $ path ) { $ modifiedTime = filemtime ( $ path ) ; if ( $ modifiedTime ) { $ this -> getHeaders ( ) -> set ( 'Last-Modified' , gmdate ( 'D, d M Y H:i:s' , $ modifiedTime ) . ' GMT' ) ; } return $ this ; }
Sets a Last-Modified header based on a given file path.

@param string $path The file to read the last modified date from.
@return static self reference
Sets a Last - Modified header based on a given file path .