Compression adapter for Rar

category Zend
package Zend_Filter

 Methods

Class constructor

__construct(array $options) 

Parameters

$options

array

(Optional) Options to set

Exceptions

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

Compresses the given content

compress(string | array $content) : string

Parameters

$content

stringarray

Exceptions

\Zend\Filter\Exception\RuntimeException if no callback available, or error during compression

Returns

string

Decompresses the given content

decompress(string $content) : bool

Parameters

$content

string

Exceptions

\Zend\Filter\Exception\RuntimeException if archive not found, cannot be opened, or error during decompression

Returns

bool

Returns the set archive

getArchive() : string

Returns

string

Returns the set callback for compression

getCallback() : 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 password

getPassword() : string

Returns

string

Returns the set targetpath

getTarget() : string

Returns

string

Sets the archive to use for de-/compression

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

Parameters

$archive

string

Archive to use

Returns

Sets the callback to use

setCallback(string $callback) : \Zend\Filter\Compress\Rar

Parameters

$callback

string

Exceptions

\Zend\Filter\Exception\InvalidArgumentException if invalid callback provided

Returns

Sets all or one option

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

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

Parameters

$options

array

Returns

Sets the password to use

setPassword(string $password) : \Zend\Filter\Compress\Rar

Parameters

$password

string

Returns

Sets the targetpath to use

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

Parameters

$target

string

Exceptions

\Zend\Filter\Exception\InvalidArgumentException if specified target directory does not exist

Returns

Returns the adapter name

toString() : string

Returns

string

 Properties

 

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

$options : array