Encrypts 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, if null mcrypt is used

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\Filter

filter(string $value) : string

Encrypts the content $value with the defined settings

Parameters

$value

string

Content to encrypt

Returns

stringThe encrypted content

Returns the name of the set adapter

getAdapter() : string

Returns

string

Returns the adapter instance

getAdapterInstance() : \Zend\Filter\Encrypt\EncryptionAlgorithmInterface

Exceptions

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

Returns

\Zend\Filter\Encrypt\EncryptionAlgorithmInterface

Retrieve options representing object state

getOptions() : array
Inherited

Returns

array

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : boolean
InheritedStatic
deprecated Since 2.1.0

Returns

boolean

Sets new encryption options

setAdapter(string|array $options = null) : \Zend\Filter\Encrypt
fluent This method is part of a fluent interface and will return the same instance

Parameters

$options

stringarray

(Optional) Encryption options

Exceptions

\Zend\Filter\Exception\DomainException
\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\Encrypt

setOptions()

setOptions(array|\Traversable $options) : \Zend\Filter\Encrypt
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\Encrypt

isOptions()

isOptions(mixed $options) : boolean
InheritedStatic

Parameters

$options

mixed

Returns

boolean

 Properties

 

Encryption adapter

$adapter 

Default

param
 

Filter options

$options : array

Default

array()