Compression adapter for zip

 Methods

Class constructor

__construct(null | array | \Traversable $options) 

Parameters

$options

nullarray\Traversable

(Optional) Options to set

Exceptions

\Zend\Filter\Exception\ExtensionNotLoadedException if zip extension not loaded

Compresses the given content

compress(string $content) : string

Parameters

$content

string

Exceptions

\Zend\Filter\Exception\RuntimeException if unable to open zip archive, or error during compression

Returns

stringCompressed archive

Decompresses the given content

decompress(string $content) : string

Parameters

$content

string

Exceptions

\Zend\Filter\Exception\RuntimeException If archive file not found, target directory not found, or error during decompression

Returns

string

Returns the proper string based on the given error constant

errorString(string $error) : string

Parameters

$error

string

Returns

string

Returns the set archive

getArchive() : string

Returns

string

Returns one or all set options

getOptions(string $option) : mixed
Inherited

inherited_from \Zend\Filter\Compress\AbstractCompressionAlgorithm::getOptions()

Parameters

$option

string

(Optional) Option to return

Returns

mixed

Returns the set targetpath

getTarget() : string

Returns

string

Sets the archive to use for de-/compression

setArchive(string $archive) : \Zend\Filter\Compress\self

Parameters

$archive

string

Archive to use

Returns

\Zend\Filter\Compress\self

Sets all or one option

setOptions(array $options) : \Zend\Filter\Compress\self
Inherited

inherited_from \Zend\Filter\Compress\AbstractCompressionAlgorithm::setOptions()

Parameters

$options

array

Returns

\Zend\Filter\Compress\self

Sets the target to use

setTarget(string $target) : \Zend\Filter\Compress\self

Parameters

$target

string

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\Compress\self

Returns the adapter name

toString() : string

Returns

string

 Properties

 

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

$options : array