|
@@ 1486-1491 (lines=6) @@
|
| 1483 |
|
*/ |
| 1484 |
|
private function process_commands($content, $replacements) |
| 1485 |
|
{ |
| 1486 |
|
if (strpos($content,'$$IF') !== false) |
| 1487 |
|
{ //Example use to use: $$IF n_prefix~Herr~Sehr geehrter~Sehr geehrte$$ |
| 1488 |
|
$this->replacements =& $replacements; |
| 1489 |
|
$content = preg_replace_callback('/\$\$IF ([#0-9a-z_\/-]+)~(.*)~(.*)~(.*)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1490 |
|
unset($this->replacements); |
| 1491 |
|
} |
| 1492 |
|
if (strpos($content,'$$NELF') !== false) |
| 1493 |
|
{ //Example: $$NEPBR org_unit$$ sets a LF and value of org_unit, only if there is a value |
| 1494 |
|
$this->replacements =& $replacements; |
|
@@ 1492-1497 (lines=6) @@
|
| 1489 |
|
$content = preg_replace_callback('/\$\$IF ([#0-9a-z_\/-]+)~(.*)~(.*)~(.*)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1490 |
|
unset($this->replacements); |
| 1491 |
|
} |
| 1492 |
|
if (strpos($content,'$$NELF') !== false) |
| 1493 |
|
{ //Example: $$NEPBR org_unit$$ sets a LF and value of org_unit, only if there is a value |
| 1494 |
|
$this->replacements =& $replacements; |
| 1495 |
|
$content = preg_replace_callback('/\$\$NELF ([#0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1496 |
|
unset($this->replacements); |
| 1497 |
|
} |
| 1498 |
|
if (strpos($content,'$$NENVLF') !== false) |
| 1499 |
|
{ //Example: $$NEPBRNV org_unit$$ sets only a LF if there is a value for org_units, but did not add any value |
| 1500 |
|
$this->replacements =& $replacements; |
|
@@ 1498-1503 (lines=6) @@
|
| 1495 |
|
$content = preg_replace_callback('/\$\$NELF ([#0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1496 |
|
unset($this->replacements); |
| 1497 |
|
} |
| 1498 |
|
if (strpos($content,'$$NENVLF') !== false) |
| 1499 |
|
{ //Example: $$NEPBRNV org_unit$$ sets only a LF if there is a value for org_units, but did not add any value |
| 1500 |
|
$this->replacements =& $replacements; |
| 1501 |
|
$content = preg_replace_callback('/\$\$NENVLF ([#0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1502 |
|
unset($this->replacements); |
| 1503 |
|
} |
| 1504 |
|
if (strpos($content,'$$LETTERPREFIX$$') !== false) |
| 1505 |
|
{ //Example use to use: $$LETTERPREFIX$$ |
| 1506 |
|
$LETTERPREFIXCUSTOM = '$$LETTERPREFIXCUSTOM n_prefix title n_family$$'; |
|
@@ 1509-1514 (lines=6) @@
|
| 1506 |
|
$LETTERPREFIXCUSTOM = '$$LETTERPREFIXCUSTOM n_prefix title n_family$$'; |
| 1507 |
|
$content = str_replace('$$LETTERPREFIX$$',$LETTERPREFIXCUSTOM,$content); |
| 1508 |
|
} |
| 1509 |
|
if (strpos($content,'$$LETTERPREFIXCUSTOM') !== false) |
| 1510 |
|
{ //Example use to use for a custom Letter Prefix: $$LETTERPREFIX n_prefix title n_family$$ |
| 1511 |
|
$this->replacements =& $replacements; |
| 1512 |
|
$content = preg_replace_callback('/\$\$LETTERPREFIXCUSTOM ([#0-9a-z_-]+)(.*)\$\$/imU',Array($this,'replace_callback'),$content); |
| 1513 |
|
unset($this->replacements); |
| 1514 |
|
} |
| 1515 |
|
return $content; |
| 1516 |
|
} |
| 1517 |
|
|