Documentation

Downloader
in package

Assist downloading files when samples are run in browser.

Never run as part of unit tests, which are command line.

Tags
codeCoverageIgnore

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

$filename  : string
$filepath  : string
$filetype  : string

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

Methods

__construct()

public __construct(string $folder, string $filename[, string|null $filetype = null ]) : mixed
Parameters
$folder : string
$filename : string
$filetype : string|null = null

contentDisposition()

protected contentDisposition() : void

        
On this page

Search results