Methods

Constructor

__construct(array | \Traversable | int | null $typeOrOptions, bool $casting, array $translations) 

Parameters

$typeOrOptions

array\Traversableintnull

$casting

bool

$translations

array

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 a boolean representation of $value

Parameters

$value

string

Exceptions

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

Returns

string

Returns the casting option

getCasting() : bool

Returns

bool

Retrieve options representing object state

getOptions() : array
Inherited

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

Returns

array

getTranslations()

getTranslations() : array

Returns

array

Returns defined boolean types

getType() : int

Returns

int

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : bool
Inherited

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

Returns

bool

Set the working mode

setCasting(bool $flag) : \Zend\Filter\self

Parameters

$flag

bool

When true this filter works like cast When false it recognises only true and false and all other values are returned as is

Returns

\Zend\Filter\self

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

setTranslations()

setTranslations(array | \Traversable $translations) : \Zend\Filter\self

Parameters

$translations

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_FALSE_STRING

TYPE_FALSE_STRING 

 

TYPE_FLOAT

TYPE_FLOAT 

 

TYPE_INTEGER

TYPE_INTEGER 

 

TYPE_LOCALIZED

TYPE_LOCALIZED 

 

TYPE_NULL

TYPE_NULL 

 

TYPE_PHP

TYPE_PHP 

 

TYPE_STRING

TYPE_STRING 

 

TYPE_ZERO_STRING

TYPE_ZERO_STRING