|
@@ 1459-1464 (lines=6) @@
|
| 1456 |
|
*/ |
| 1457 |
|
private function process_commands($content, $replacements) |
| 1458 |
|
{ |
| 1459 |
|
if (strpos($content,'$$IF') !== false) |
| 1460 |
|
{ //Example use to use: $$IF n_prefix~Herr~Sehr geehrter~Sehr geehrte$$ |
| 1461 |
|
$this->replacements =& $replacements; |
| 1462 |
|
$content = preg_replace_callback('/\$\$IF ([#0-9a-z_\/-]+)~(.*)~(.*)~(.*)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1463 |
|
unset($this->replacements); |
| 1464 |
|
} |
| 1465 |
|
if (strpos($content,'$$NELF') !== false) |
| 1466 |
|
{ //Example: $$NEPBR org_unit$$ sets a LF and value of org_unit, only if there is a value |
| 1467 |
|
$this->replacements =& $replacements; |
|
@@ 1465-1470 (lines=6) @@
|
| 1462 |
|
$content = preg_replace_callback('/\$\$IF ([#0-9a-z_\/-]+)~(.*)~(.*)~(.*)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1463 |
|
unset($this->replacements); |
| 1464 |
|
} |
| 1465 |
|
if (strpos($content,'$$NELF') !== false) |
| 1466 |
|
{ //Example: $$NEPBR org_unit$$ sets a LF and value of org_unit, only if there is a value |
| 1467 |
|
$this->replacements =& $replacements; |
| 1468 |
|
$content = preg_replace_callback('/\$\$NELF ([#0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1469 |
|
unset($this->replacements); |
| 1470 |
|
} |
| 1471 |
|
if (strpos($content,'$$NENVLF') !== false) |
| 1472 |
|
{ //Example: $$NEPBRNV org_unit$$ sets only a LF if there is a value for org_units, but did not add any value |
| 1473 |
|
$this->replacements =& $replacements; |
|
@@ 1471-1476 (lines=6) @@
|
| 1468 |
|
$content = preg_replace_callback('/\$\$NELF ([#0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1469 |
|
unset($this->replacements); |
| 1470 |
|
} |
| 1471 |
|
if (strpos($content,'$$NENVLF') !== false) |
| 1472 |
|
{ //Example: $$NEPBRNV org_unit$$ sets only a LF if there is a value for org_units, but did not add any value |
| 1473 |
|
$this->replacements =& $replacements; |
| 1474 |
|
$content = preg_replace_callback('/\$\$NENVLF ([#0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1475 |
|
unset($this->replacements); |
| 1476 |
|
} |
| 1477 |
|
if (strpos($content,'$$LETTERPREFIX$$') !== false) |
| 1478 |
|
{ //Example use to use: $$LETTERPREFIX$$ |
| 1479 |
|
$LETTERPREFIXCUSTOM = '$$LETTERPREFIXCUSTOM n_prefix title n_family$$'; |
|
@@ 1482-1487 (lines=6) @@
|
| 1479 |
|
$LETTERPREFIXCUSTOM = '$$LETTERPREFIXCUSTOM n_prefix title n_family$$'; |
| 1480 |
|
$content = str_replace('$$LETTERPREFIX$$',$LETTERPREFIXCUSTOM,$content); |
| 1481 |
|
} |
| 1482 |
|
if (strpos($content,'$$LETTERPREFIXCUSTOM') !== false) |
| 1483 |
|
{ //Example use to use for a custom Letter Prefix: $$LETTERPREFIX n_prefix title n_family$$ |
| 1484 |
|
$this->replacements =& $replacements; |
| 1485 |
|
$content = preg_replace_callback('/\$\$LETTERPREFIXCUSTOM ([#0-9a-z_-]+)(.*)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1486 |
|
unset($this->replacements); |
| 1487 |
|
} |
| 1488 |
|
return $content; |
| 1489 |
|
} |
| 1490 |
|
|