Documentation

DataFileDecompressor
in package

Decompresses a data file. Supports zip and gzip compression.

Table of Contents

CONTENT_TYPE_GZIP  = "application/x-gzip"
CONTENT_TYPE_ZIP  = "application/zip"
XMSG_DECOMPRESS_ERROR  = "Could not decompress gzipped/zipped content. Please check you have write permissions to: %s."
XMSG_DECOMPRESS_OPEN_FILE_ERROR  = "Could not open gzipped/zipped content at: %s."
XMSG_ZIP_MOD_EXT_NOT_FOUND_ERROR  = "Zip module/extension not found. Please install it or use gzip data file url for download."
$dataFile  : mixed
$supportedContentTypes  : mixed
__construct()  : mixed
decompress()  : bool
getSupportedContentTypes()  : mixed
isDecompressionRequired()  : mixed
decompressGzip()  : bool
Decompress Gzip and extract in a 'configured_file_directory/temporary file'.
decompressZip()  : bool
Decompress Zip and extract in a 'configured_file_directory/temporary file'.

Constants

XMSG_DECOMPRESS_ERROR

public mixed XMSG_DECOMPRESS_ERROR = "Could not decompress gzipped/zipped content. Please check you have write permissions to: %s."

XMSG_DECOMPRESS_OPEN_FILE_ERROR

public mixed XMSG_DECOMPRESS_OPEN_FILE_ERROR = "Could not open gzipped/zipped content at: %s."

XMSG_ZIP_MOD_EXT_NOT_FOUND_ERROR

public mixed XMSG_ZIP_MOD_EXT_NOT_FOUND_ERROR = "Zip module/extension not found. Please install it or use gzip data file url for download."

Properties

$supportedContentTypes

private static mixed $supportedContentTypes = array(self::CONTENT_TYPE_ZIP, self::CONTENT_TYPE_GZIP)

Methods

__construct()

public __construct(mixed $dataFile) : mixed
Parameters
$dataFile : mixed
Return values
mixed

getSupportedContentTypes()

public static getSupportedContentTypes() : mixed
Return values
mixed

isDecompressionRequired()

public isDecompressionRequired(mixed $contentType) : mixed
Parameters
$contentType : mixed
Return values
mixed

Search results