Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
zendframework1
library
Zend
Validate
LessThan.php
Go to the documentation of this file.
1
<?php
25
#require_once 'Zend/Validate/Abstract.php';
26
33
class
Zend_Validate_LessThan
extends
Zend_Validate_Abstract
34
{
35
const
NOT_LESS
=
'notLessThan'
;
36
40
protected
$_messageTemplates
= array(
41
self::NOT_LESS =>
"'%value%' is not less than '%max%'"
42
);
43
47
protected
$_messageVariables
= array(
48
'max'
=>
'_max'
49
);
50
56
protected
$_max
;
57
64
public
function
__construct
($max)
65
{
66
if
($max instanceof
Zend_Config
) {
67
$max = $max->toArray();
68
}
69
70
if
(is_array($max)) {
71
if
(array_key_exists(
'max'
, $max)) {
72
$max = $max[
'max'
];
73
}
else
{
74
#require_once 'Zend/Validate/Exception.php';
75
throw
new
Zend_Validate_Exception
(
"Missing option 'max'"
);
76
}
77
}
78
79
$this->
setMax
($max);
80
}
81
87
public
function
getMax
()
88
{
89
return
$this->_max
;
90
}
91
98
public
function
setMax
($max)
99
{
100
$this->_max = $max;
101
return
$this;
102
}
103
112
public
function
isValid
(
$value
)
113
{
114
$this->
_setValue
(
$value
);
115
if
($this->_max <=
$value
) {
116
$this->
_error
(self::NOT_LESS);
117
return
false
;
118
}
119
return
true
;
120
}
121
122
}
Zend_Validate_LessThan\$_max
$_max
Definition:
LessThan.php:56
Zend_Validate_LessThan\NOT_LESS
const NOT_LESS
Definition:
LessThan.php:35
Zend_Validate_Abstract\_error
_error($messageKey, $value=null)
Definition:
Abstract.php:284
Zend_Validate_LessThan\getMax
getMax()
Definition:
LessThan.php:87
Zend_Validate_LessThan\$_messageTemplates
$_messageTemplates
Definition:
LessThan.php:40
$value
$value
Definition:
gender.phtml:16
Zend_Validate_LessThan\isValid
isValid($value)
Definition:
LessThan.php:112
Zend_Validate_LessThan
Definition:
LessThan.php:33
Zend_Validate_Abstract
Definition:
Abstract.php:33
Zend_Validate_Abstract\_setValue
_setValue($value)
Definition:
Abstract.php:303
Zend_Validate_LessThan\__construct
__construct($max)
Definition:
LessThan.php:64
Zend_Validate_LessThan\$_messageVariables
$_messageVariables
Definition:
LessThan.php:47
Zend_Config
Zend_Validate_LessThan\setMax
setMax($max)
Definition:
LessThan.php:98
Zend_Validate_Exception
Definition:
Exception.php:33