Encrypts a given string

category Zend
package Zend_Filter

 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) 

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()

inherited_from \Zend\Filter\AbstractFilter::__invoke()

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

Exceptions

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

Returns

stringThe encrypted content

Returns the name of the set adapter

getAdapter() : string

Returns

string

Retrieve options representing object state

getOptions() : array
Inherited

inherited_from \Zend\Filter\AbstractFilter::getOptions()

Returns

array

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::hasPcreUnicodeSupport()

Returns

bool

Sets new encryption options

setAdapter(string | array $options) : \Zend\Filter\Encrypt

Parameters

$options

stringarray

(Optional) Encryption options

Exceptions

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

Returns

setOptions()

setOptions(array | \Traversable $options) : \Zend\Filter\AbstractFilter
Inherited

inherited_from \Zend\Filter\AbstractFilter::setOptions()

Parameters

$options

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

isOptions()

isOptions(mixed $options) : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::isOptions()

Parameters

$options

mixed

Returns

bool

 Properties

 

Encryption adapter

$adapter 

 

Is PCRE is compiled with UTF-8 and Unicode support

$hasPcreUnicodeSupport : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::$$hasPcreUnicodeSupport
 

Filter options

$options : array
Inherited

inherited_from \Zend\Filter\AbstractFilter::$$options