Documentation

DownloadHelper
in package

Table of Contents

CSV_TYPE  = ['ext' => 'csv', 'content-type' => 'text/csv']
JSON_TYPE  = ['ext' => 'json', 'content-type' => 'application/json']
XLSX_TYPE  = ['ext' => 'xlsx', 'content-type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']
download()  : void

Constants

CSV_TYPE

public mixed CSV_TYPE = ['ext' => 'csv', 'content-type' => 'text/csv']

JSON_TYPE

public mixed JSON_TYPE = ['ext' => 'json', 'content-type' => 'application/json']

XLSX_TYPE

public mixed XLSX_TYPE = ['ext' => 'xlsx', 'content-type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']

Methods

download()

public static download(mixed $content, string $outputName, array<string|int, mixed> $type) : void
Parameters
$content : mixed

Содержимое файла

$outputName : string

Имя файла при выводе на загрузку (без расширения)

$type : array<string|int, mixed>

Массив с типом файла

Tags
throws
Exception
Return values
void

Search results