Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Zend_Filter_Null Class Reference

Public Member Functions

 __construct ($options=null)
 Constructor.
 
 getType ()
 Returns the set null types.
 
 setType ($type=null)
 Set the null types.
 
 filter ($value)
 Defined by Zend_Filter_Interface.
 

Public Attributes

const BOOLEAN = 1
 
const INTEGER = 2
 
const EMPTY_ARRAY = 4
 
const STRING = 8
 
const ZERO = 16
 
const ALL = 31
 

Protected Attributes

 $_constants
 
 $_type = self::ALL
 

Constructor & Destructor Documentation

__construct (   $options = null)

Constructor.

Parameters
string | array | Zend_Config$optionsOPTIONAL

Member Function Documentation

filter (   $value)

Defined by Zend_Filter_Interface.

Returns null representation of $value, if value is empty and matches types that should be considered null.

Parameters
string$value
Returns
string

Implements Zend_Filter_Interface.

getType ( )

Returns the set null types.

Returns
array
setType (   $type = null)

Set the null types.

Parameters
integer | array$type
Exceptions
Zend_Filter_Exception
Returns
Zend_Filter_Null

Member Data Documentation

$_constants
protected
Initial value:
= array(
self::BOOLEAN => 'boolean',
self::INTEGER => 'integer',
self::EMPTY_ARRAY => 'array',
self::STRING => 'string',
self::ZERO => 'zero',
self::ALL => 'all'
)
$_type = self::ALL
protected
const ALL = 31
const BOOLEAN = 1
const EMPTY_ARRAY = 4
const INTEGER = 2
const STRING = 8
const ZERO = 16