Compression adapter for Tar

package Default
inherited_from \Zend\Filter\Compress\AbstractCompressionAlgorithm

 Methods

Class constructor

__construct(array $options = null
inherited_from \Zend\Filter\Compress\AbstractCompressionAlgorithm::__construct()

Parameters

$options

array

(Optional) Options to set

Exceptions

\Zend\Filter\Exception\ExtensionNotLoadedException if Archive_Tar component not available

Class constructor

__construct(null|array|\Traversable $options = null
Inherited

Parameters

$options

nullarray\Traversable

(Optional) Options to set

Compresses the given content

compress(string $content) : string

Parameters

$content

string

Exceptions

\Zend\Filter\Exception\RuntimeException if unable to create temporary file
\Zend\Filter\Exception\RuntimeException if unable to create archive

Returns

string

Decompresses the given content

decompress(string $content) : string

Parameters

$content

string

Exceptions

\Zend\Filter\Exception\RuntimeException if unable to find archive
\Zend\Filter\Exception\RuntimeException if error occurs decompressing archive

Returns

string

Returns the set archive

getArchive() : string

Returns

string

Returns the set compression mode

getMode() : string

Returns

string

Returns one or all set options

getOptions(string $option = null) : mixed
Inherited

Parameters

$option

string

(Optional) Option to return

Returns

mixed

Returns the set target path

getTarget() : string

Returns

string

Sets the archive to use for de-/compression

setArchive(string $archive) : \Zend\Filter\Compress\Tar
fluent This method is part of a fluent interface and will return the same instance

Parameters

$archive

string

Archive to use

Returns

\Zend\Filter\Compress\Tar

Compression mode to use

setMode(string $mode) : \Zend\Filter\Compress\Tar

Either Gz or Bz2.

fluent This method is part of a fluent interface and will return the same instance

Parameters

$mode

string

Exceptions

\Zend\Filter\Exception\InvalidArgumentException for invalid $mode values
\Zend\Filter\Exception\ExtensionNotLoadedException if bz2 mode selected but extension not loaded
\Zend\Filter\Exception\ExtensionNotLoadedException if gz mode selected but extension not loaded

Returns

\Zend\Filter\Compress\Tar

Sets all or one option

setOptions(array $options) : \Zend\Filter\Compress\Tar
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$options

array

Returns

\Zend\Filter\Compress\Tar

Sets the target path to use

setTarget(string $target) : \Zend\Filter\Compress\Tar
fluent This method is part of a fluent interface and will return the same instance

Parameters

$target

string

Exceptions

\Zend\Filter\Exception\InvalidArgumentException if target path does not exist

Returns

\Zend\Filter\Compress\Tar

Returns the adapter name

toString() : string

Returns

string

 Properties

 

Compression Options array( 'archive' => Archive to use 'target' => Target to write the files to )

$options : array

Default

array('archive' => null, 'target' => '.', 'mode' => null)
inherited_from \Zend\Filter\Compress\AbstractCompressionAlgorithm::options
 

$options

$options : array

Default

array()