232. Class

232.1. Zend\Filter\Compress\Zip

Compression adapter for zip

232.1.1. Methods

232.1.1.1. __construct

__construct()

Class constructor

Parameters:null|array|Traversable – (Optional) Options to set
Throws ExceptionExtensionNotLoadedException:
 if zip extension not loaded

232.1.1.2. getArchive

getArchive()

Returns the set archive

Return type:string

232.1.1.3. setArchive

setArchive()

Sets the archive to use for de-/compression

Parameters:string – Archive to use
Return type:Zip

232.1.1.4. getTarget

getTarget()

Returns the set targetpath

Return type:string

232.1.1.5. setTarget

setTarget()

Sets the target to use

Parameters:string
Throws ExceptionInvalidArgumentException:
 
Return type:Zip

232.1.1.6. compress

compress()

Compresses the given content

Parameters:string
Return type:string Compressed archive
Throws :ExceptionRuntimeException if unable to open zip archive, or error during compression

232.1.1.7. decompress

decompress()

Decompresses the given content

Parameters:string
Return type:string
Throws :ExceptionRuntimeException If archive file not found, target directory not found, or error during decompression

232.1.1.8. errorString

errorString()

Returns the proper string based on the given error constant

Parameters:string
Return type:string

232.1.1.9. toString

toString()

Returns the adapter name

Return type:string