Nextcloud PHP API (master)

ZipResponse extends Response
in package
implements ICallbackResponse

Public library to send several files in one zip archive.

Tags
since
15.0.0
template

S of int

template

H of array<string, mixed>

template-extends

Response<int, array<string, mixed>>

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

$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
since
15.0.0

addResource()

public addResource(mixed $r, string $internalName, int $size[, int $time = -1 ]) : mixed
Parameters
$r : mixed
$internalName : string
$size : int
$time : int = -1
Tags
since
15.0.0

callback()

Outputs the content that should be printed

public callback(IOutput $output) : mixed
Parameters
$output : IOutput

a small wrapper that handles output

Tags
since
15.0.0

        
On this page

Search results