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
GreaterThan.php
Go to the documentation of this file.
1
<?php
25
#require_once 'Zend/Validate/Abstract.php';
26
33
class
Zend_Validate_GreaterThan
extends
Zend_Validate_Abstract
34
{
35
36
const
NOT_GREATER
=
'notGreaterThan'
;
37
41
protected
$_messageTemplates
= array(
42
self::NOT_GREATER =>
"'%value%' is not greater than '%min%'"
,
43
);
44
48
protected
$_messageVariables
= array(
49
'min'
=>
'_min'
50
);
51
57
protected
$_min
;
58
65
public
function
__construct
($min)
66
{
67
if
($min instanceof
Zend_Config
) {
68
$min = $min->toArray();
69
}
70
71
if
(is_array($min)) {
72
if
(array_key_exists(
'min'
, $min)) {
73
$min = $min[
'min'
];
74
}
else
{
75
#require_once 'Zend/Validate/Exception.php';
76
throw
new
Zend_Validate_Exception
(
"Missing option 'min'"
);
77
}
78
}
79
80
$this->
setMin
($min);
81
}
82
88
public
function
getMin
()
89
{
90
return
$this->_min
;
91
}
92
99
public
function
setMin
($min)
100
{
101
$this->_min = $min;
102
return
$this;
103
}
104
113
public
function
isValid
(
$value
)
114
{
115
$this->
_setValue
(
$value
);
116
117
if
($this->_min >=
$value
) {
118
$this->
_error
(self::NOT_GREATER);
119
return
false
;
120
}
121
return
true
;
122
}
123
124
}
Zend_Validate_GreaterThan\NOT_GREATER
const NOT_GREATER
Definition:
GreaterThan.php:36
Zend_Validate_Abstract\_error
_error($messageKey, $value=null)
Definition:
Abstract.php:284
Zend_Validate_GreaterThan\__construct
__construct($min)
Definition:
GreaterThan.php:65
Zend_Validate_GreaterThan\$_messageVariables
$_messageVariables
Definition:
GreaterThan.php:48
Zend_Validate_GreaterThan\getMin
getMin()
Definition:
GreaterThan.php:88
$value
$value
Definition:
gender.phtml:16
Zend_Validate_GreaterThan\$_min
$_min
Definition:
GreaterThan.php:57
Zend_Validate_Abstract
Definition:
Abstract.php:33
Zend_Validate_Abstract\_setValue
_setValue($value)
Definition:
Abstract.php:303
Zend_Validate_GreaterThan\setMin
setMin($min)
Definition:
GreaterThan.php:99
Zend_Config
Zend_Validate_GreaterThan\$_messageTemplates
$_messageTemplates
Definition:
GreaterThan.php:41
Zend_Validate_GreaterThan
Definition:
GreaterThan.php:33
Zend_Validate_Exception
Definition:
Exception.php:33
Zend_Validate_GreaterThan\isValid
isValid($value)
Definition:
GreaterThan.php:113