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
Hex.php
Go to the documentation of this file.
1
<?php
25
#require_once 'Zend/Validate/Abstract.php';
26
33
class
Zend_Validate_Hex
extends
Zend_Validate_Abstract
34
{
35
const
INVALID
=
'hexInvalid'
;
36
const
NOT_HEX
=
'notHex'
;
37
43
protected
$_messageTemplates
= array(
44
self::INVALID =>
"Invalid type given. String expected"
,
45
self::NOT_HEX =>
"'%value%' has not only hexadecimal digit characters"
,
46
);
47
56
public
function
isValid
(
$value
)
57
{
58
if
(!is_string(
$value
) && !is_int(
$value
)) {
59
$this->
_error
(self::INVALID);
60
return
false
;
61
}
62
63
$this->
_setValue
(
$value
);
64
if
(!ctype_xdigit((
string
)
$value
)) {
65
$this->
_error
(self::NOT_HEX);
66
return
false
;
67
}
68
69
return
true
;
70
}
71
72
}
Zend_Validate_Hex\isValid
isValid($value)
Definition:
Hex.php:56
Zend_Validate_Hex\NOT_HEX
const NOT_HEX
Definition:
Hex.php:36
Zend_Validate_Abstract\_error
_error($messageKey, $value=null)
Definition:
Abstract.php:284
$value
$value
Definition:
gender.phtml:16
Zend_Validate_Abstract
Definition:
Abstract.php:33
Zend_Validate_Abstract\_setValue
_setValue($value)
Definition:
Abstract.php:303
Zend_Validate_Hex\$_messageTemplates
$_messageTemplates
Definition:
Hex.php:43
Zend_Validate_Hex
Definition:
Hex.php:33
Zend_Validate_Hex\INVALID
const INVALID
Definition:
Hex.php:35