Downloader
    
            
            in package
            
        
    
    
    
Assist downloading files when samples are run in browser.
Never run as part of unit tests, which are command line.
Tags
Table of Contents
Constants
- CONTENT_TYPES = ['xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xls' => 'application/vnd.ms-excel', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'csv' => 'text/csv', 'html' => 'text/html', 'pdf' => 'application/pdf']
Properties
Methods
- __construct() : mixed
- download() : void
- headers() : void
- cacheHeaders() : void
- contentDisposition() : void
- contentType() : void
- fileSize() : void
Constants
CONTENT_TYPES
    protected
        mixed
    CONTENT_TYPES
    = ['xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xls' => 'application/vnd.ms-excel', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'csv' => 'text/csv', 'html' => 'text/html', 'pdf' => 'application/pdf']
    
    
    
    
Properties
$filename
        protected
            string
    $filename
    
    
    
    
    
    
$filepath
        protected
            string
    $filepath
    
    
    
    
    
    
$filetype
        protected
            string
    $filetype
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct(string $folder, string $filename[, string|null $filetype = null ]) : mixed
    Parameters
- $folder : string
- $filename : string
- $filetype : string|null = null
download()
    public
                    download() : void
    headers()
    public
                    headers() : void
    cacheHeaders()
    protected
                    cacheHeaders() : void
    contentDisposition()
    protected
                    contentDisposition() : void
    contentType()
    protected
                    contentType() : void
    fileSize()
    protected
                    fileSize() : void