class Template
Light template mechanism
author | Jan Lengowski <Jan.Lengowski@4fb.de> |
---|---|
copyright | four for business |
author | Stefan Jelner (Optimizations) |
version | 1.0 |
__construct($tags) : void
generate(string $template, bool $return, bool $note) : string
(do translations sequentially to save memory!!!)
string
Either template string or template file path
bool
Return or print template
bool
Echo "Generated by ... " Comment
string
Complete Template stringnext() : void
replacei18n(string $template, string $functionName) : void
string
Contents of the template to translate (it is reference to save memory!!!)
string
Name of the translation function (e.g. i18n)
reset() : void
set(string $which, string $needle, string $replacement) : void
With this method you can replace the placeholders in the static templates with dynamic data.
string
's' for Static or else dynamic
string
Placeholder
string
Replacement String
setDomain(string $sDomain) : void
string
Sets the domain to use for template translations
setEncoding(string $encoding) : void
string
Encoding to set
$Dyn_needles : array
$Dyn_replacements : array
$dyn_cnt : int
$needles : array
$replacements : array
$_sDomain : string