Replace Class provided by System to replace placeholders in text and files ${placeholder}.
| package |
SYSTEM\PAGE |
|---|
clean(string $text) : string
Effectively removing all Placeholders
stringtext to be subject of replacements
stringReturns string of the text with all placeholders removed.
replace(string $text, array $vars = array()) : string
Array Key of Placeholders represents the name of the placeholder. The value to the key is filled in.
"Text ${textplaceholder}" array('textplaceholder' => 'test') resolves to: "Text test"
stringtext to be subject of replacements
arrayArray with Placeholders.
stringReturns string of the text with replaced placeholder.
replaceFile(string $path, array $vars = array()) : string
Array Key of Placeholders represents the name of the placeholder. The value to the key is filled in.
"Text ${textplaceholder}" array('textplaceholder' => 'test') resolves to: "Text test"
stringFilepath of file to be subject of replacements
arrayArray with Placeholders.
stringReturns string of the text with replaced placeholder.