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
파일 보기 프로젝트 열기: microweber/microweber

공개 메소드들

메소드 설명
__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