__destroy()
allow()
close()
debug_string()
error_string()
extract()
set_debug()
set_error()
_extract_file()
_get_file_header()
_list_files()
_load_file_list_by_eof()
_load_files_by_signatures()
_uncompress()
$_allow_extensions
$_skip_dirs
$_target_dir
$_zip_file
$apply_chmod
$central_dir_list
$central_signature_end
$compressed_list
$dir_signature
$end_of_central
$error
$fh
$info
$zip_signature
UnZip Class
This class is based on a library I found at PHPClasses: http://phpclasses.org/package/2495-PHP-Pack-and-unpack-files-packed-in-ZIP-archives.html
The original library is a little rough around the edges so I refactored it and added several additional methods -- Phil Sturgeon
This class requires extension ZLib Enabled.
package | Fuel |
---|---|
subpackage | Core |
category | Encryption |
author | Alexandre Tedeschi |
author | Phil Sturgeon |
license | |
version | 1.0.0 |
__destroy()
allow(string $ext)
string
close()
debug_string(string $open, string $close) : string
string
string
string
error_string(string $open, string $close) : string
string
string
string
extract(string $zip_file, string $target_dir, string $preserve_filepath) : array
string
string
string
\FuelException |
---|
array
set_debug($string)
set_error($string)
_extract_file(string $compressed_file_name, string $target_file_name) : int | string | bool
string
string
\FuelException |
---|
int
string
bool
_get_file_header($fh, $start_offset)
_list_files(bool $stop_on_file) : array
bool
\FuelException |
---|
array
_load_file_list_by_eof($fh, $stop_on_file)
_load_files_by_signatures($fh, $stop_on_file)
_uncompress(mixed $content, int $mode, int $uncompressed_size, string $target_file_name) : int | string | bool
And save it to the targetFile.
mixed
int
int
string
\FuelException |
---|
int
string
bool
$_allow_extensions
$_skip_dirs
$_target_dir
$_zip_file
$apply_chmod
$central_dir_list
$central_signature_end
$compressed_list
$dir_signature
$end_of_central
$error
$fh
$info
$zip_signature