PHP 클래스 PHPZip\Zip\File\Zip

상속: extends PHPZip\Zip\Core\AbstractZipArchive
파일 보기 프로젝트 열기: Grandt/PHPZip 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( boolean $useZipFile = false ) Constructor.
__destruct ( ) Destructor.
getArchiveSize ( ) : integer Return the current size of the archive
getZipData ( ) : string Get the zip file contents If the zip haven't been finalized yet, this will cause it to become finalized
getZipFile ( ) : resource Get the handle resource for the archive zip file.
onBeginAddFile ( array $params ) Called by superclass when specialised action is needed at the start of adding a file to the archive.
onBeginBuildResponseHeader ( ) Called by superclass when specialised action is needed at the start of sending the zip file response header.
onBuildZipEntry ( array $params ) Called by superclass when specialised action is needed while building a zip entry.
onEndAddFile ( array $params ) Called by superclass when specialised action is needed at the end of adding a file to the archive.
onEndBuildResponseHeader ( ) Called by superclass when specialised action is needed at the end of sending the zip file response header.
onOpenStream ( ) Called by superclass when specialised action is needed while opening a stream.
onProcessFile ( array $params ) Called by superclass when specialised action is needed while processing a file.
saveZipFile ( $fileName ) : boolean Alias for setZipFile
sendZip ( String $fileName = null, String $contentType = self::CONTENT_TYPE, String $utf8FileName = null, boolean $inline = false ) : boolean Send the archive as a zip download
setZipFile ( string $fileName ) : boolean Set zip file to write zip data to.
zipFlush ( ) Flush Zip Data stored in memory, to a temp file.
zipFlushBuffer ( )
zipVerifyMemBuffer ( integer $gzLength ) Verify if the memory buffer is about to be exceeded.
zipWrite ( string $data )

메소드 상세

__construct() 공개 메소드

Constructor.
저자: A. Grandt ([email protected])
저자: Greg Kappatos
public __construct ( boolean $useZipFile = false )
$useZipFile boolean Write temp zip data to tempFile? Default FALSE

__destruct() 공개 메소드

Perform clean up actions.
저자: A. Grandt ([email protected])
public __destruct ( )

getArchiveSize() 공개 메소드

Return the current size of the archive
저자: A. Grandt ([email protected])
public getArchiveSize ( ) : integer
리턴 integer Size of the archive

getZipData() 공개 메소드

Get the zip file contents If the zip haven't been finalized yet, this will cause it to become finalized
저자: A. Grandt ([email protected])
저자: Greg Kappatos
public getZipData ( ) : string
리턴 string zip data

getZipFile() 공개 메소드

If the zip haven't been finalized yet, this will cause it to become finalized
저자: A. Grandt ([email protected])
public getZipFile ( ) : resource
리턴 resource zip file handle

onBeginAddFile() 공개 메소드

Called by superclass when specialised action is needed at the start of adding a file to the archive.
저자: A. Grandt ([email protected])
저자: Greg Kappatos
public onBeginAddFile ( array $params )
$params array Array that contains gzLength.

onBeginBuildResponseHeader() 공개 메소드

Called by superclass when specialised action is needed at the start of sending the zip file response header.
저자: A. Grandt ([email protected])
저자: Greg Kappatos

onBuildZipEntry() 공개 메소드

Called by superclass when specialised action is needed while building a zip entry.
저자: A. Grandt ([email protected])
저자: Greg Kappatos
public onBuildZipEntry ( array $params )
$params array Array that contains zipEntry.

onEndAddFile() 공개 메소드

Called by superclass when specialised action is needed at the end of adding a file to the archive.
저자: A. Grandt ([email protected])
저자: Greg Kappatos
public onEndAddFile ( array $params )
$params array Array that contains gzData.

onEndBuildResponseHeader() 공개 메소드

Called by superclass when specialised action is needed at the end of sending the zip file response header.
저자: A. Grandt ([email protected])
저자: Greg Kappatos

onOpenStream() 공개 메소드

Called by superclass when specialised action is needed while opening a stream.
저자: A. Grandt ([email protected])
저자: Greg Kappatos
public onOpenStream ( )

onProcessFile() 공개 메소드

Called by superclass when specialised action is needed while processing a file.
저자: A. Grandt ([email protected])
저자: Greg Kappatos
public onProcessFile ( array $params )
$params array Array that contains data.

saveZipFile() 공개 메소드

Alias for setZipFile
public saveZipFile ( $fileName ) : boolean
$fileName
리턴 boolean

sendZip() 공개 메소드

Send the archive as a zip download
저자: A. Grandt ([email protected])
public sendZip ( String $fileName = null, String $contentType = self::CONTENT_TYPE, String $utf8FileName = null, boolean $inline = false ) : boolean
$fileName String The name of the Zip archive, in ISO-8859-1 (or ASCII) encoding, ie. "archive.zip". Optional, defaults to null, which means that no ISO-8859-1 encoded file name will be specified.
$contentType String Content mime type. Optional, defaults to "application/zip".
$utf8FileName String The name of the Zip archive, in UTF-8 encoding. Optional, defaults to null, which means that no UTF-8 encoded file name will be specified.
$inline boolean Use Content-Disposition with "inline" instead of "attachment". Optional, defaults to false.
리턴 boolean $success

setZipFile() 공개 메소드

This will cause all present and future data written to this class to be written to this file. This can be used at any time, even after the Zip Archive have been finalized. Any previous file will be closed. Warning: If the given file already exists, it will be overwritten.
저자: A. Grandt ([email protected])
public setZipFile ( string $fileName ) : boolean
$fileName string
리턴 boolean Success

zipFlush() 공개 메소드

Flush Zip Data stored in memory, to a temp file.
저자: A. Grandt ([email protected])
public zipFlush ( )

zipFlushBuffer() 공개 메소드

저자: A. Grandt ([email protected])
public zipFlushBuffer ( )

zipVerifyMemBuffer() 공개 메소드

Verify if the memory buffer is about to be exceeded.
저자: A. Grandt ([email protected])
public zipVerifyMemBuffer ( integer $gzLength )
$gzLength integer length of the pending data.

zipWrite() 공개 메소드

저자: A. Grandt ([email protected])
public zipWrite ( string $data )
$data string