package Default
inherited_from \Zend\Filter\AbstractFilter

 Methods

Constructor

__construct(string|array|\Traversable $typeOrOptions = null

Parameters

$typeOrOptions

stringarray\Traversable

OPTIONAL

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

Returns

string

Retrieve options representing object state

getOptions() : array
Inherited

Returns

array

Returns defined boolean types

getType() : integer

Returns

integer

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : boolean
InheritedStatic
deprecated Since 2.1.0

Returns

boolean

setOptions()

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

Set boolean types

setType(integer|array $type = null) : \Zend\Filter\ToNull
fluent This method is part of a fluent interface and will return the same instance

Parameters

$type

integerarray

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\ToNull

isOptions()

isOptions(mixed $options) : boolean
InheritedStatic

Parameters

$options

mixed

Returns

boolean

 Properties

 

$constants

$constants : array

Default

array(self::TYPE_BOOLEAN => 'boolean', self::TYPE_INTEGER => 'integer', self::TYPE_EMPTY_ARRAY => 'array', self::TYPE_STRING => 'string', self::TYPE_ZERO_STRING => 'zero', self::TYPE_FLOAT => 'float', self::TYPE_ALL => 'all')
 

Filter options

$options : array

Default

array('type' => self::TYPE_ALL)
inherited_from \Zend\Filter\AbstractFilter::options
 

Filter options

$options : array

Default

array()

 Constants

 

TYPE_ALL

TYPE_ALL = 63 
 

TYPE_BOOLEAN

TYPE_BOOLEAN = 1 
 

TYPE_EMPTY_ARRAY

TYPE_EMPTY_ARRAY = 4 
 

TYPE_FLOAT

TYPE_FLOAT = 32 
 

TYPE_INTEGER

TYPE_INTEGER = 2 
 

TYPE_STRING

TYPE_STRING = 8 
 

TYPE_ZERO_STRING

TYPE_ZERO_STRING = 16