Definition at line 33 of file Null.php.
◆ __construct()
__construct |
( |
|
$options = null | ) |
|
Constructor
- Parameters
-
Definition at line 63 of file Null.php.
◆ filter()
Defined by Zend_Filter_Interface
Returns null representation of $value, if value is empty and matches types that should be considered null.
- Parameters
-
- Returns
- string
Implements Zend_Filter_Interface.
Definition at line 137 of file Null.php.
142 if (
$type >= self::ZERO) {
150 if (
$type >= self::STRING) {
158 if (
$type >= self::EMPTY_ARRAY) {
166 if (
$type >= self::INTEGER) {
174 if (
$type >= self::BOOLEAN) {
◆ getType()
Returns the set null types
- Returns
- array
Definition at line 88 of file Null.php.
◆ setType()
Set the null types
- Parameters
-
- Exceptions
-
- Returns
- Zend_Filter_Null
Definition at line 100 of file Null.php.
102 if (is_array(
$type)) {
107 }
else if (in_array(
$value, $this->_constants)) {
108 $detected += array_search(
$value, $this->_constants);
113 }
else if (is_string(
$type)) {
114 if (in_array(
$type, $this->_constants)) {
115 $type = array_search(
$type, $this->_constants);
120 #require_once 'Zend/Filter/Exception.php'; 124 $this->_type =
$type;
◆ $_constants
Initial value:= array(
self::BOOLEAN => 'boolean',
self::INTEGER => 'integer',
self::EMPTY_ARRAY => 'array',
self::STRING => 'string',
self::ZERO => 'zero',
self::ALL => 'all'
)
Definition at line 42 of file Null.php.
◆ $_type
◆ ALL
◆ BOOLEAN
◆ EMPTY_ARRAY
◆ INTEGER
◆ STRING
◆ ZERO
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Filter/Null.php