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
Pdf
Element
Name.php
Go to the documentation of this file.
1
<?php
24
#require_once 'Zend/Pdf/Element.php';
25
26
35
class
Zend_Pdf_Element_Name
extends
Zend_Pdf_Element
36
{
42
public
$value
;
43
44
51
public
function
__construct
($val)
52
{
53
settype($val,
'string'
);
54
if
(strpos($val,
"\x00"
) !==
false
) {
55
#require_once 'Zend/Pdf/Exception.php';
56
throw
new
Zend_Pdf_Exception
(
'Null character is not allowed in PDF Names'
);
57
}
58
$this->
value
= (string)$val;
59
}
60
61
67
public
function
getType
()
68
{
69
return
Zend_Pdf_Element::TYPE_NAME
;
70
}
71
72
79
public
static
function
escape
($inStr)
80
{
81
$outStr =
''
;
82
83
for
(
$count
= 0;
$count
< strlen($inStr);
$count
++) {
84
$nextCode = ord($inStr[
$count
]);
85
86
switch
($inStr[
$count
]) {
87
case
'('
:
88
// fall through to next case
89
case
')'
:
90
// fall through to next case
91
case
'<'
:
92
// fall through to next case
93
case
'>'
:
94
// fall through to next case
95
case
'['
:
96
// fall through to next case
97
case
']'
:
98
// fall through to next case
99
case
'{'
:
100
// fall through to next case
101
case
'}'
:
102
// fall through to next case
103
case
'/'
:
104
// fall through to next case
105
case
'%'
:
106
// fall through to next case
107
case
'\\'
:
108
// fall through to next case
109
case
'#'
:
110
$outStr .= sprintf(
'#%02X'
, $nextCode);
111
break
;
112
113
default
:
114
if
($nextCode >= 33 && $nextCode <= 126 ) {
115
// Visible ASCII symbol
116
$outStr .= $inStr[
$count
];
117
}
else
{
118
$outStr .= sprintf(
'#%02X'
, $nextCode);
119
}
120
}
121
122
}
123
124
return
$outStr;
125
}
126
127
134
public
static
function
unescape
($inStr)
135
{
136
$outStr =
''
;
137
138
for
(
$count
= 0;
$count
< strlen($inStr);
$count
++) {
139
if
($inStr[
$count
] !=
'#'
) {
140
$outStr .= $inStr[
$count
];
141
}
else
{
142
// Escape sequence
143
$outStr .= chr(base_convert(substr($inStr,
$count
+1, 2), 16, 10 ));
144
$count
+=2;
145
}
146
}
147
return
$outStr;
148
}
149
150
157
public
function
toString
(
$factory
=
null
)
158
{
159
return
'/'
.
self::escape
((
string
)$this->
value
);
160
}
161
}
value
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition:
block.php:9
Zend_Pdf_Element\TYPE_NAME
const TYPE_NAME
Definition:
Element.php:35
$count
$count
Definition:
recent.phtml:13
Zend_Pdf_Element
Definition:
Element.php:30
Zend_Pdf_Element_Name\getType
getType()
Definition:
Name.php:67
Zend_Pdf_Element_Name\$value
$value
Definition:
Name.php:42
$factory
$factory
Definition:
category_multiple_stores.php:10
Zend_Pdf_Element_Name\toString
toString($factory=null)
Definition:
Name.php:157
Zend_Pdf_Element_Name\escape
static escape($inStr)
Definition:
Name.php:79
Zend_Pdf_Exception
Definition:
Exception.php:51
Zend_Pdf_Element_Name\unescape
static unescape($inStr)
Definition:
Name.php:134
Zend_Pdf_Element_Name
Definition:
Name.php:35
Zend_Pdf_Element_Name\__construct
__construct($val)
Definition:
Name.php:51