Filter/Boolean.php

Show: PublicProtectedPrivateinherited
Table of Contents
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
Implements
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  BOOLEAN = 1
>VConstant  INTEGER = 2
>VConstant  FLOAT = 4
>VConstant  STRING = 8
>VConstant  ZERO = 16
>VConstant  EMPTY_ARRAY = 32
>VConstant  NULL = 64
>VConstant  PHP = 127
>VConstant  FALSE_STRING = 128
>VConstant  YES = 256
>VConstant  ALL = 511

Properties

>VPropertyprotectedboolean $_casting = true
Internal mode
Default valuetrueDetails
Type
boolean
>VPropertyprotected$_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 valuearray(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
>VPropertyprotectedarray $_locale = array('auto')
Internal locale
Default valuearray('auto')Details
Type
array
>VPropertyprotectedinteger $_type = self::PHP
Internal type to detect
Default valueself::PHPDetails
Type
integer

Methods

methodpublic__construct(string | array | \Zend_Config $options = null) : void

Constructor

Parameters
NameTypeDescription
$optionsstring | array | \Zend_Config

OPTIONAL

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

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

Parameters
NameTypeDescription
$valuestring
$yesboolean
$localearray
Returns
TypeDescription
boolean
methodpublicfilter(string $value) : string

Defined by Zend_Filter_Interface

Returns a boolean representation of $value
Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
string
methodpublicgetCasting() : boolean

Returns the casting option

Returns
TypeDescription
boolean
methodpublicgetLocale() : array

Returns the set locale

Returns
TypeDescription
array
methodpublicgetType() : int

Returns the set null types

Returns
TypeDescription
int
methodpublicsetCasting( $casting = true) : \Zend_Filter_Boolean

Set the working mode

Parameters
NameTypeDescription
$casting
Returns
TypeDescription
\Zend_Filter_Boolean
Throws
ExceptionDescription
\Zend_Filter_Exception
methodpublicsetLocale(string | array | \Zend_Locale $locale = null) : \Zend_Filter_Boolean

Set the locales which are accepted

Parameters
NameTypeDescription
$localestring | array | \Zend_Locale
Returns
TypeDescription
\Zend_Filter_Boolean
Throws
ExceptionDescription
\Zend_Filter_Exception
methodpublicsetType(integer | array $type = null) : \Zend_Filter_Boolean

Set the null types

Parameters
NameTypeDescription
$typeinteger | array
Returns
TypeDescription
\Zend_Filter_Boolean
Throws
ExceptionDescription
\Zend_Filter_Exception
Documentation was generated by phpDocumentor 2.2.0 .