HumHub Documentation (unofficial)

Archive
in package

FinalYes

Table of Contents

Constants

DEFAULT_DEFLATE_LEVEL  = 6

Properties

$comment  : string
$contentDisposition  : string
HTTP Content-Disposition. Defaults to 'attachment', where FILENAME is the specified filename.
$contentType  : string
Note that this does nothing if you are not sending HTTP headers.
$deflateLevel  : int
$enableZip64  : bool
Enable Zip64 extension, supporting very large archives (any size > 4 GB or file count > 64k)
$flushOutput  : bool
Enable flush after every write to output stream.
$httpHeaderCallback  : callable
The method called to send headers
$largeFileMethod  : Method
How to handle large files. Legal values are Method::STORE() (the default), or Method::DEFLATE(). STORE sends the file raw and is significantly faster, while DEFLATE compresses the file and is much, much slower. Note that DEFLATE must compress the file twice and is extremely slow.
$largeFileSize  : int
Size, in bytes, of the largest file to try and load into memory (used by addFileFromPath()). Large files may also be compressed differently; see the 'largeFileMethod' option. Default is ~20 Mb.
$outputStream  : StreamInterface|resource
$sendHttpHeaders  : bool
Boolean indicating whether or not to send the HTTP headers for this file.
$statFiles  : bool
Enable reading file stat for determining file size.
$zeroHeader  : bool
Enable streaming files with single read where general purpose bit 3 indicates local file header contain zero values in crc and size fields, these appear only after file contents in data descriptor block.

Methods

__construct()  : mixed
Options constructor.
getComment()  : string
getContentDisposition()  : string
getContentType()  : string
getDeflateLevel()  : int
getHttpHeaderCallback()  : callable
getLargeFileMethod()  : Method
getLargeFileSize()  : int
getOutputStream()  : StreamInterface|resource
isEnableZip64()  : bool
isFlushOutput()  : bool
isSendHttpHeaders()  : bool
isStatFiles()  : bool
isZeroHeader()  : bool
setComment()  : void
setContentDisposition()  : void
setContentType()  : void
setDeflateLevel()  : void
setEnableZip64()  : void
setFlushOutput()  : void
setHttpHeaderCallback()  : void
setLargeFileMethod()  : void
setLargeFileSize()  : void
setOutputStream()  : void
setSendHttpHeaders()  : void
setStatFiles()  : void
setZeroHeader()  : void

Constants

DEFAULT_DEFLATE_LEVEL

public mixed DEFAULT_DEFLATE_LEVEL = 6

Properties

$comment

private string $comment = ''

$contentDisposition

HTTP Content-Disposition. Defaults to 'attachment', where FILENAME is the specified filename.

private string $contentDisposition = 'attachment'

Note that this does nothing if you are not sending HTTP headers.

$contentType

Note that this does nothing if you are not sending HTTP headers.

private string $contentType = 'application/x-zip'

$deflateLevel

private int $deflateLevel = 6

$enableZip64

Enable Zip64 extension, supporting very large archives (any size > 4 GB or file count > 64k)

private bool $enableZip64 = true

$flushOutput

Enable flush after every write to output stream.

private bool $flushOutput = false

$httpHeaderCallback

The method called to send headers

private callable $httpHeaderCallback = 'header'

$largeFileMethod

How to handle large files. Legal values are Method::STORE() (the default), or Method::DEFLATE(). STORE sends the file raw and is significantly faster, while DEFLATE compresses the file and is much, much slower. Note that DEFLATE must compress the file twice and is extremely slow.

private Method $largeFileMethod

$largeFileSize

Size, in bytes, of the largest file to try and load into memory (used by addFileFromPath()). Large files may also be compressed differently; see the 'largeFileMethod' option. Default is ~20 Mb.

private int $largeFileSize = 20 * 1024 * 1024

$sendHttpHeaders

Boolean indicating whether or not to send the HTTP headers for this file.

private bool $sendHttpHeaders = false

$statFiles

Enable reading file stat for determining file size.

private bool $statFiles = true

When a 32-bit system reads file size that is over 2 GB, invalid value appears in file size due to integer overflow. Should be disabled on 32-bit systems with method addFileFromPath if any file may exceed 2 GB. In this case file will be read in blocks and correct size will be determined from content.

$zeroHeader

Enable streaming files with single read where general purpose bit 3 indicates local file header contain zero values in crc and size fields, these appear only after file contents in data descriptor block.

private bool $zeroHeader = false

Methods

__construct()

Options constructor.

public __construct() : mixed

getComment()

public getComment() : string
Return values
string

getContentDisposition()

public getContentDisposition() : string
Return values
string

getContentType()

public getContentType() : string
Return values
string

getDeflateLevel()

public getDeflateLevel() : int
Return values
int

getHttpHeaderCallback()

public getHttpHeaderCallback() : callable
Return values
callable

getLargeFileSize()

public getLargeFileSize() : int
Return values
int

isEnableZip64()

public isEnableZip64() : bool
Return values
bool

isFlushOutput()

public isFlushOutput() : bool
Return values
bool

isSendHttpHeaders()

public isSendHttpHeaders() : bool
Return values
bool

isStatFiles()

public isStatFiles() : bool
Return values
bool

isZeroHeader()

public isZeroHeader() : bool
Return values
bool

setComment()

public setComment(string $comment) : void
Parameters
$comment : string

setContentDisposition()

public setContentDisposition(string $contentDisposition) : void
Parameters
$contentDisposition : string

setContentType()

public setContentType(string $contentType) : void
Parameters
$contentType : string

setDeflateLevel()

public setDeflateLevel(int $deflateLevel) : void
Parameters
$deflateLevel : int

setEnableZip64()

public setEnableZip64(bool $enableZip64) : void
Parameters
$enableZip64 : bool

setFlushOutput()

public setFlushOutput(bool $flushOutput) : void
Parameters
$flushOutput : bool

setHttpHeaderCallback()

public setHttpHeaderCallback(callable $httpHeaderCallback) : void
Parameters
$httpHeaderCallback : callable

setLargeFileMethod()

public setLargeFileMethod(Method $largeFileMethod) : void
Parameters
$largeFileMethod : Method

setLargeFileSize()

public setLargeFileSize(int $largeFileSize) : void
Parameters
$largeFileSize : int

setSendHttpHeaders()

public setSendHttpHeaders(bool $sendHttpHeaders) : void
Parameters
$sendHttpHeaders : bool

setStatFiles()

public setStatFiles(bool $statFiles) : void
Parameters
$statFiles : bool

setZeroHeader()

public setZeroHeader(bool $zeroHeader) : void
Parameters
$zeroHeader : bool

        
On this page

Search results