Documentation

DataFileDecompressor
in package

Decompresses a data file. Supports zip and gzip compression.

Table of Contents

Constants

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."
XMSG_ZLIB_MOD_EXT_NOT_FOUND_ERROR  = "Zlib module/extension not found. Please install it or use zip data file url for download."

Properties

$dataFile  : mixed
$supportedContentTypes  : mixed

Methods

__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."

XMSG_ZLIB_MOD_EXT_NOT_FOUND_ERROR

public mixed XMSG_ZLIB_MOD_EXT_NOT_FOUND_ERROR = "Zlib module/extension not found. Please install it or use zip data file url for download."

Properties

$supportedContentTypes

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

Methods

isDecompressionRequired()

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

decompressGzip()

Decompress Gzip and extract in a 'configured_file_directory/temporary file'.

private decompressGzip() : bool

Delete the gzip file.

Tags
throws
DataLoadingException
Return values
bool

decompressZip()

Decompress Zip and extract in a 'configured_file_directory/temporary file'.

private decompressZip() : bool

Delete the zip file.

Tags
throws
DataLoadingException
Return values
bool

        
On this page

Search results