ZipResponse
extends Response
in package
implements
ICallbackResponse
Public library to send several files in one zip archive.
Tags
Table of Contents
Interfaces
- ICallbackResponse
- Interface ICallbackResponse
Properties
- $name : string
- $request : IRequest
- $resources : array<string|int, array{internalName: string, resource: resource, size: int, time: int}>
Methods
- __construct() : mixed
- addResource() : mixed
- callback() : mixed
- Outputs the content that should be printed
Properties
$name
private
string
$name
Filename that the zip file should have
$request
private
IRequest
$request
$resources
private
array<string|int, array{internalName: string, resource: resource, size: int, time: int}>
$resources
= []
Files to be added to the zip response
Methods
__construct()
public
__construct(IRequest $request[, string $name = 'output' ][, S $status = Http::STATUS_OK ][, H $headers = [] ]) : mixed
Parameters
- $request : IRequest
- $name : string = 'output'
- $status : S = Http::STATUS_OK
- $headers : H = []
Tags
addResource()
public
addResource(mixed $r, string $internalName, int $size[, int $time = -1 ]) : mixed
Parameters
- $r : mixed
- $internalName : string
- $size : int
- $time : int = -1
Tags
callback()
Outputs the content that should be printed
public
callback(IOutput $output) : mixed
Parameters
- $output : IOutput
-
a small wrapper that handles output