Methods

Constructor

__construct(string | array | \Traversable $typeOrOptions) 

Parameters

$typeOrOptions

stringarray\Traversable

OPTIONAL

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

filter(string $value) : string

Returns null representation of $value, if value is empty and matches types that should be considered null.

Parameters

$value

string

Exceptions

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

Returns

string

Retrieve options representing object state

getOptions() : array
Inherited

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

Returns

array

Returns defined boolean types

getType() : int

Returns

int

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : bool
Inherited

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

Returns

bool

setOptions()

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

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

Parameters

$options

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\self

Set boolean types

setType(int | array $type) : \Zend\Filter\self

Parameters

$type

intarray

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\self

isOptions()

isOptions(mixed $options) : bool
Inherited

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

Parameters

$options

mixed

Returns

bool

 Properties

 

$constants

$constants : array

 

Filter options

$options : array

 Constants

 

TYPE_ALL

TYPE_ALL 

 

TYPE_BOOLEAN

TYPE_BOOLEAN 

 

TYPE_EMPTY_ARRAY

TYPE_EMPTY_ARRAY 

 

TYPE_FLOAT

TYPE_FLOAT 

 

TYPE_INTEGER

TYPE_INTEGER 

 

TYPE_STRING

TYPE_STRING 

 

TYPE_ZERO_STRING

TYPE_ZERO_STRING