Compresses a given string

package Default
inherited_from \Zend\Filter\AbstractFilter

 Methods

Calls adapter methods

__call(string $method, string|array $options) : mixed

Parameters

$method

string

Method to call

$options

stringarray

Options for this method

Exceptions

\Zend\Filter\Exception\BadMethodCallException

Returns

mixed

Class constructor

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

Parameters

$options

stringarray\Traversable

(Optional) Options to set

Invoke filter as a command

__invoke(mixed $value) : mixed
Inherited

Proxies to \filter()

Parameters

$value

mixed

Exceptions

\Zend\Filter\Exception\ExceptionInterface If filtering $value is impossible

Returns

mixed

Defined by Zend\Filter\FilterInterface

filter(string $value) : string

Compresses the content $value with the defined settings

Parameters

$value

string

Content to compress

Returns

stringThe compressed content

Returns the current adapter, instantiating it if necessary

getAdapter() : \Zend\Filter\Compress\CompressionAlgorithmInterface

Exceptions

\Zend\Filter\Exception\RuntimeException
\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\Compress\CompressionAlgorithmInterface

Retrieve adapter name

getAdapterName() : string

Returns

string

Retrieve adapter options

getAdapterOptions() : array

Returns

array

Get individual or all options from underlying adapter

getOptions(null|string $option = null) : mixed
inherited_from \Zend\Filter\AbstractFilter::getOptions()

Parameters

$option

nullstring

Returns

mixed

Retrieve options representing object state

getOptions() : array
Inherited

Returns

array

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : boolean
InheritedStatic
deprecated Since 2.1.0

Returns

boolean

Sets compression adapter

setAdapter(string|\Zend\Filter\Compress\CompressionAlgorithmInterface $adapter) : \Zend\Filter\Compress
fluent This method is part of a fluent interface and will return the same instance

Parameters

$adapter

string\Zend\Filter\Compress\CompressionAlgorithmInterface

Adapter to use

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\Compress

Set adapter options

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

Parameters

$options

array

Returns

\Zend\Filter\Compress

Set filter setate

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

Parameters

$options

array

Exceptions

\Zend\Filter\Exception\InvalidArgumentException if options is not an array or Traversable

Returns

\Zend\Filter\Compress

setOptions()

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

Parameters

$options

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\Compress

isOptions()

isOptions(mixed $options) : boolean
InheritedStatic

Parameters

$options

mixed

Returns

boolean

 Properties

 

Compression adapter

$adapter 

Default

'Gz'
 

Compression adapter constructor options

$adapterOptions 

Default

array()
 

Filter options

$options : array

Default

array()