category Zend
package Zend_Filter
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor

__construct(string|array|\Zend_Config $options = null

Parameters

$options

stringarray\Zend_Config

OPTIONAL

Defined by Zend_Filter_Interface

filter(string $value) : string

Returns a boolean representation of $value

inherited_from \Zend_Filter_Interface::filter()

Parameters

$value

string

Returns

string

Returns the casting option

getCasting() : boolean

Returns

boolean

Returns the set locale

getLocale() : array

Returns

array

Returns the set null types

getType() : integer

Returns

integer

Set the working mode

setCasting($casting = true) : \Zend_Filter_Boolean

Parameters

$casting

Exceptions

\Zend_Filter_Exception

Returns

\Zend_Filter_Boolean

Set the locales which are accepted

setLocale(string|array|\Zend_Locale $locale = null) : \Zend_Filter_Boolean

Parameters

$locale

stringarray\Zend_Locale

Exceptions

\Zend_Filter_Exception

Returns

\Zend_Filter_Boolean

Set the null types

setType(integer|array $type = null) : \Zend_Filter_Boolean

Parameters

$type

integerarray

Exceptions

\Zend_Filter_Exception

Returns

\Zend_Filter_Boolean

Determine the value of a localized string, and compare it to a given value

_getLocalizedQuestion(string $value, boolean $yes, array $locale) : boolean

Parameters

$value

string

$yes

boolean

$locale

array

Returns

boolean

 Properties

 

Internal mode

$_casting : boolean

Default

true
 

$_constants

$_constants 

Default

array(self::BOOLEAN => 'boolean', self::INTEGER => 'integer', self::FLOAT => 'float', self::STRING => 'string', self::ZERO => 'zero', self::EMPTY_ARRAY => 'array', self::NULL => 'null', self::PHP => 'php', self::FALSE_STRING => 'false', self::YES => 'yes', self::ALL => 'all')
 

Internal locale

$_locale : array

Default

array('auto')
 

Internal type to detect

$_type : integer

Default

self::PHP

 Constants

 

ALL

ALL = 511 
 

BOOLEAN

BOOLEAN = 1 
 

EMPTY_ARRAY

EMPTY_ARRAY = 32 
 

FALSE_STRING

FALSE_STRING = 128 
 

FLOAT

FLOAT = 4 
 

INTEGER

INTEGER = 2 
 

NULL

NULL = 64 
 

PHP

PHP = 127 
 

STRING

STRING = 8 
 

YES

YES = 256 
 

ZERO

ZERO = 16