231. Class

231.1. Zend\Filter\Compress\Tar

Compression adapter for Tar

231.1.1. Methods

231.1.1.1. __construct

__construct()

Class constructor

Parameters:array – (Optional) Options to set
Throws ExceptionExtensionNotLoadedException:
 if Archive_Tar component not available

231.1.1.2. getArchive

getArchive()

Returns the set archive

Return type:string

231.1.1.3. setArchive

setArchive()

Sets the archive to use for de-/compression

Parameters:string – Archive to use
Return type:Tar

231.1.1.4. getTarget

getTarget()

Returns the set target path

Return type:string

231.1.1.5. setTarget

setTarget()

Sets the target path to use

Parameters:string
Return type:Tar
Throws :ExceptionInvalidArgumentException if target path does not exist

231.1.1.6. getMode

getMode()

Returns the set compression mode

Return type:string

231.1.1.7. setMode

setMode()

Compression mode to use

Either Gz or Bz2.

Parameters:string
Return type:Tar
Throws :ExceptionInvalidArgumentException for invalid $mode values
Throws :ExceptionExtensionNotLoadedException if bz2 mode selected but extension not loaded
Throws :ExceptionExtensionNotLoadedException if gz mode selected but extension not loaded

231.1.1.8. compress

compress()

Compresses the given content

Parameters:string
Return type:string
Throws :ExceptionRuntimeException if unable to create temporary file
Throws :ExceptionRuntimeException if unable to create archive

231.1.1.9. decompress

decompress()

Decompresses the given content

Parameters:string
Return type:string
Throws :ExceptionRuntimeException if unable to find archive
Throws :ExceptionRuntimeException if error occurs decompressing archive

231.1.1.10. toString

toString()

Returns the adapter name

Return type:string