Encrypts a given file and stores the encrypted file content

package Default
inherited_from \Zend\Filter\Encrypt

 Methods

Calls adapter methods

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

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
Inherited

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|array $value) : string | array

Encrypts the file $value with the defined settings

inherited_from \Zend\Filter\Encrypt::filter()

Parameters

$value

stringarray

Full path of file to change or $_FILES data array

Exceptions

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

Returns

stringarrayThe filename which has been set, or false when there were errors

Defined by Zend\Filter\Filter

filter(string $value) : string
Inherited

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
Inherited

Returns

string

Returns the adapter instance

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

Exceptions

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

Returns

\Zend\Filter\Encrypt\EncryptionAlgorithmInterface

Returns the new filename where the content will be stored

getFilename() : string

Returns

string

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\File\Encrypt
Inherited
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\File\Encrypt

Sets the new filename where the content will be stored

setFilename(string $filename = null) : \Zend\Filter\File\Encrypt
fluent This method is part of a fluent interface and will return the same instance

Parameters

$filename

string

(Optional) New filename to set

Returns

\Zend\Filter\File\Encrypt

setOptions()

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

isOptions()

isOptions(mixed $options) : boolean
InheritedStatic

Parameters

$options

mixed

Returns

boolean

 Properties

 

Encryption adapter

$adapter 

Default

param
 

New filename to set

$filename : string

Default

 

Filter options

$options : array

Default

array()