Filter/Boolean.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Filter
- Version
- $Id$
\Zend_Filter_Boolean
Package: Zend_Filter
Returns
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
$_constants = 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')
Default value
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')
Details- Type
- n/a
Methods
__construct(string | array | \Zend_Config $options = null) : void
Constructor
Parameters
Name | Type | Description |
---|---|---|
$options | string | array | \Zend_Config | OPTIONAL |
_getLocalizedQuestion(string $value, boolean $yes, array $locale) : boolean
Determine the value of a localized string, and compare it to a given value
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | string | |
$yes | boolean | |
$locale | array |
Type | Description |
---|---|
boolean |
filter(string $value) : string
Defined by Zend_Filter_Interface
Returns a boolean representation of $value
ParametersName | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
string |
setCasting( $casting = true) : \Zend_Filter_Boolean
Set the working mode
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$casting |
Type | Description |
---|---|
\Zend_Filter_Boolean |
Exception | Description |
---|---|
\Zend_Filter_Exception |
setLocale(string | array | \Zend_Locale $locale = null) : \Zend_Filter_Boolean
Set the locales which are accepted
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$locale | string | array | \Zend_Locale |
Type | Description |
---|---|
\Zend_Filter_Boolean |
Exception | Description |
---|---|
\Zend_Filter_Exception |
setType(integer | array $type = null) : \Zend_Filter_Boolean
Set the null types
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$type | integer | array |
Type | Description |
---|---|
\Zend_Filter_Boolean |
Exception | Description |
---|---|
\Zend_Filter_Exception |