PHP Класс Microweber\Utils\Unzip

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.
Автор: Alexandre Tedeschi
Автор: Phil Sturgeon
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ) : none Constructor.
__destroy ( ) : none Free the file resource Automatic destroy.
allow ( $ext = null ) : none What extensions do we want out of this ZIP.
close ( ) : none Free the file resource.
debug_string ( $open = '<p>', $close = '</p>' ) : string Show debug messages.
error_string ( $open = '<p>', $close = '</p>' ) : string Show error messages.
extract ( $zip_file, $target_dir = null, $preserve_filepath = true ) : none Unzip all files in archive.
native_unzip ( $zip_file, $target_dir = null, $preserve_filepath = true ) --------------------------------------------------------------------
old_____extract ( $zip_file, $target_dir = null, $preserve_filepath = true )
set_debug ( $string ) : none Save debug data.
set_error ( $string ) : none Save errors.

Приватные методы

Метод Описание
_extract_file ( $compressed_file_name, $target_file_name = false, $underscore_case = false ) : Unziped Unzip file in archive.
_get_file_header ( &$fh, $start_offset = false ) --------------------------------------------------------------------
_list_files ( $stop_on_file = false ) : mixed List all files in archive.
_load_file_list_by_eof ( &$fh, $stop_on_file = false ) --------------------------------------------------------------------
_load_files_by_signatures ( &$fh, $stop_on_file = false ) --------------------------------------------------------------------
_uncompress ( $content, $mode, $uncompressed_size, $target_file_name = false ) : none Uncompress file. And save it to the targetFile.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( ) : none
Результат none

__destroy() публичный Метод

Free the file resource Automatic destroy.
public __destroy ( ) : none
Результат none

allow() публичный Метод

What extensions do we want out of this ZIP.
public allow ( $ext = null ) : none
Результат none

close() публичный Метод

Free the file resource.
public close ( ) : none
Результат none

debug_string() публичный Метод

Show debug messages.
public debug_string ( $open = '<p>', $close = '</p>' ) : string
Результат string

error_string() публичный Метод

Show error messages.
public error_string ( $open = '<p>', $close = '</p>' ) : string
Результат string

extract() публичный Метод

Unzip all files in archive.
public extract ( $zip_file, $target_dir = null, $preserve_filepath = true ) : none
Результат none

native_unzip() публичный Метод

--------------------------------------------------------------------
public native_unzip ( $zip_file, $target_dir = null, $preserve_filepath = true )

old_____extract() публичный Метод

public old_____extract ( $zip_file, $target_dir = null, $preserve_filepath = true )

set_debug() публичный Метод

Save debug data.
public set_debug ( $string ) : none
Результат none

set_error() публичный Метод

Save errors.
public set_error ( $string ) : none
Результат none