Definition at line 34 of file String.php.
◆ __construct()
Object constructor
- Parameters
-
Definition at line 48 of file String.php.
50 $this->
value = (string)$val;
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
◆ escape()
Escape string according to the PDF rules
- Parameters
-
- Returns
- string
Definition at line 83 of file String.php.
85 $outEntries = array();
87 foreach (str_split($str, 128) as $chunk) {
89 $offset = strcspn($chunk,
"\n\r\t\x08\x0C()\\");
90 $chunkOut = substr($chunk, 0, $offset);
92 while ($offset < strlen($chunk)) {
93 $nextCode = ord($chunk[$offset++]);
151 $offset += strcspn($chunk,
"\n\r\t\x08\x0C()\\", $offset);
155 $outEntries[] = $chunkOut;
158 return implode(
"\\\n", $outEntries);
◆ getType()
Return type of the element.
- Returns
- integer
Definition at line 59 of file String.php.
◆ toString()
toString |
( |
|
$factory = null | ) |
|
Return object as string
- Parameters
-
- Returns
- string
Definition at line 71 of file String.php.
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
◆ unescape()
Unescape string according to the PDF rules
- Parameters
-
- Returns
- string
Definition at line 168 of file String.php.
170 $outEntries = array();
173 while ($offset < strlen($str)) {
175 $escapeCharOffset = strpos($str,
'\\', $offset);
176 if ($escapeCharOffset ===
false || $escapeCharOffset == strlen($str) - 1) {
178 $outEntries[] = substr($str, $offset);
182 $outEntries[] = substr($str, $offset, $escapeCharOffset - $offset);
184 $offset = $escapeCharOffset + 1;
186 switch ($str[$offset]) {
189 $outEntries[] =
"\n";
194 $outEntries[] =
"\r";
199 $outEntries[] =
"\t";
204 $outEntries[] =
"\x08";
209 $outEntries[] =
"\x0C";
224 $outEntries[] =
'\\';
230 if ($str[$offset + 1] ==
"\r") {
236 if (strpos(
'0123456789', $str[$offset]) !==
false) {
239 $nextCode =
'0' . $str[$offset];
241 if (strpos(
'0123456789', $str[$offset + 1]) !==
false) {
242 $nextCode .= $str[++$offset];
244 if (strpos(
'0123456789', $str[$offset + 1]) !==
false) {
245 $nextCode .= $str[++$offset];
249 $outEntries[] = chr(octdec($nextCode));
251 $outEntries[] = $str[$offset];
260 return implode($outEntries);
◆ $value
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Pdf/Element/String.php