FlysystemFileResponse
class FlysystemFileResponse extends Response (View source)
Heavily based on BinaryFileResponse represents an HTTP response delivering a file.
Properties
| static protected | $trustXSendfileTypeHeader | ||
| protected File | $file | ||
| protected FilesystemInterface | $filesystem | ||
| protected | $offset | ||
| protected | $maxlen | 
Methods
                    __construct(File $file, FilesystemInterface $filesystem, int $status = 200, array $headers = array(), bool $public = true, null|string $contentDisposition = null, bool $autoEtag = false)
        
                                            
                
            Constructor.
                    static BinaryFileResponse
                
                
                    create(SplFileInfo|string $file = null, int $status = 200, array $headers = array(), bool $public = true, null|string $contentDisposition = null, bool $autoEtag = false)
        
                                            
                
            No description
                    BinaryFileResponse
                
                
                    setFile(SplFileInfo|string $file, string $contentDisposition = null, bool $autoEtag = false)
        
                                            
                
            Sets the file to stream.
                    File
                
                
                    getFile()
        
                                            
                
            Gets the file.
                    setAutoEtag()
        
                                            
                
            Automatically sets the ETag header according to the checksum of the file.
                    BinaryFileResponse
                
                
                    setContentDisposition(string $disposition, string $filename = '', string $filenameFallback = '')
        
                                            
                
            Sets the Content-Disposition header with the given filename.
                    prepare(Request $request)
        
                                            
                
            {@inheritdoc}
                    sendContent()
        
                                            
                
            Sends the file.
                    setContent($content)
        
                                            
                
            {@inheritdoc}
                    false
                
                
                    getContent()
        
                                            
                
            {@inheritdoc}
                    static 
                
                
                    trustXSendfileTypeHeader()
        
                                            
                
            Trust X-Sendfile-Type header.
Details
        
                            
    __construct(File $file, FilesystemInterface $filesystem, int $status = 200, array $headers = array(), bool $public = true, null|string $contentDisposition = null, bool $autoEtag = false)
        
    
    Constructor.
        
                static            BinaryFileResponse
    create(SplFileInfo|string $file = null, int $status = 200, array $headers = array(), bool $public = true, null|string $contentDisposition = null, bool $autoEtag = false)
        
    
    No description
        
                            BinaryFileResponse
    setFile(SplFileInfo|string $file, string $contentDisposition = null, bool $autoEtag = false)
        
    
    Sets the file to stream.
        
                            File
    getFile()
        
    
    Gets the file.
        
                            
    setAutoEtag()
        
    
    Automatically sets the ETag header according to the checksum of the file.
        
                            BinaryFileResponse
    setContentDisposition(string $disposition, string $filename = '', string $filenameFallback = '')
        
    
    Sets the Content-Disposition header with the given filename.
        
                            
    prepare(Request $request)
        
    
    {@inheritdoc}
        
                            
    sendContent()
        
    
    Sends the file.
        
                            
    setContent($content)
        
    
    {@inheritdoc}
        
                            false
    getContent()
        
    
    {@inheritdoc}
        
                static            
    trustXSendfileTypeHeader()
        
    
    Trust X-Sendfile-Type header.