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
Http
Header
HeaderValue.php
Go to the documentation of this file.
1
<?php
31
final
class
Zend_Http_Header_HeaderValue
32
{
36
private
function
__construct()
37
{
38
}
39
53
public
static
function
filter
(
$value
)
54
{
55
$value
= (string)
$value
;
56
$length = strlen(
$value
);
57
$string =
''
;
58
for
(
$i
= 0;
$i
< $length;
$i
+= 1) {
59
$ascii = ord(
$value
[
$i
]);
60
61
// Non-visible, non-whitespace characters
62
// 9 === horizontal tab
63
// 32-126, 128-254 === visible
64
// 127 === DEL
65
// 255 === null byte
66
if
(($ascii < 32 && $ascii !== 9)
67
|| $ascii === 127
68
|| $ascii > 254
69
) {
70
continue
;
71
}
72
73
$string .=
$value
[
$i
];
74
}
75
76
return
$string;
77
}
78
90
public
static
function
isValid
(
$value
)
91
{
92
$value
= (string)
$value
;
93
$length = strlen(
$value
);
94
for
(
$i
= 0;
$i
< $length;
$i
+= 1) {
95
$ascii = ord(
$value
[
$i
]);
96
97
// Non-visible, non-whitespace characters
98
// 9 === horizontal tab
99
// 32-126, 128-254 === visible
100
// 127 === DEL
101
// 255 === null byte
102
if
(($ascii < 32 && $ascii !== 9)
103
|| $ascii === 127
104
|| $ascii > 254
105
) {
106
return
false
;
107
}
108
}
109
110
return
true
;
111
}
112
120
public
static
function
assertValid
(
$value
)
121
{
122
if
(! self::isValid(
$value
)) {
123
#require_once 'Zend/Http/Header/Exception/InvalidArgumentException.php';
124
throw
new
Zend_Http_Header_Exception_InvalidArgumentException
(
'Invalid header value'
);
125
}
126
}
127
}
$value
$value
Definition:
gender.phtml:16
Zend_Http_Header_HeaderValue\isValid
static isValid($value)
Definition:
HeaderValue.php:90
Zend_Http_Header_HeaderValue\filter
static filter($value)
Definition:
HeaderValue.php:53
Zend_Http_Header_HeaderValue
Definition:
HeaderValue.php:31
Zend_Http_Header_Exception_InvalidArgumentException
Definition:
InvalidArgumentException.php:35
Zend_Http_Header_HeaderValue\assertValid
static assertValid($value)
Definition:
HeaderValue.php:120
$i
$i
Definition:
gallery.phtml:31