category Zend
package Zend_Filter

 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) : Boolean

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

Boolean

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

setTranslations()

setTranslations(array | \Traversable $translations) : Boolean

Parameters

$translations

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

Boolean

Set boolean types

setType(integer | array $type) : Boolean

Parameters

$type

integerarray

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

Boolean

isOptions()

isOptions(mixed $options) : bool
Inherited

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

Parameters

$options

mixed

Returns

bool

 Properties

 

$constants

$constants : array

 

Is PCRE is compiled with UTF-8 and Unicode support

$hasPcreUnicodeSupport : bool
Inherited

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

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