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
Returns
mixed
Defined by Zend\Filter\FilterInterface
filter(string $value) : string
Returns a boolean representation of $value
Parameters
$value
string
Exceptions
Returns
string
Returns the casting option
getCasting() : bool
Retrieve options representing object state
getOptions() : array
Inherited
inherited_from |
\Zend\Filter\AbstractFilter::getOptions() |
Returns
array
getTranslations()
getTranslations() : array
Returns defined boolean types
getType() : 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
Returns
\Zend\Filter\self
setTranslations()
setTranslations(array | \Traversable $translations) : \Zend\Filter\self
Parameters
$translations
array\Traversable
Exceptions
Returns
\Zend\Filter\self
Set boolean types
setType(int | array $type) : \Zend\Filter\self
Parameters
$type
intarray
Exceptions
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_BOOLEAN
TYPE_BOOLEAN
TYPE_EMPTY_ARRAY
TYPE_EMPTY_ARRAY
TYPE_FALSE_STRING
TYPE_FALSE_STRING
TYPE_INTEGER
TYPE_INTEGER
TYPE_LOCALIZED
TYPE_LOCALIZED
TYPE_ZERO_STRING
TYPE_ZERO_STRING