Template()
generate()
next()
replacei18n()
reset()
set()
setDomain()
setEncoding()
$Dyn_needles
$Dyn_replacements
$_sDomain
$db
$dyn_cnt
$needles
$replacements
$tags
class Template
Light template mechanism
| author | Jan Lengowski <Jan.Lengowski@4fb.de> |
|---|---|
| copyright | four for business <http://www.4fb.de> |
| author | Stefan Jelner (Optimizations) |
| version | 1.0 |
Template($tags) : void
generate(\$template $template, \$return $return, \$note $note) : string
\$templatestring/file Template
\$returnbool Return or print template
\$notebool Echo "Generated by ... " Comment
stringcomplete Template stringnext() : void
replacei18n(\$template $template, \$functionName $functionName)
Replaces a named function with the translated variant
\$templatestring Contents of the template to translate (it is reference to save memory!!!)
\$functionNamestring Name of the translation function (e.g. i18n)
reset() : void
set(\$which $which, \$needle $needle, \$replacement $replacement) : void
With this method you can replace the placeholders in the static templates with dynamic data.
\$whichString 's' for Static or else dynamic
\$needleString Placeholder
\$replacementString Replacement String
setDomain(\$sDomain $sDomain) : \none
Sets the gettext domain to use for translations in a template
\$sDomainstring Sets the domain to use for template translations
\nonesetEncoding(\$encoding $encoding)
\$encodingstring Encoding to set
$Dyn_needles : array
$Dyn_replacements : array
$_sDomain : string
$db : object
$dyn_cnt : int
$needles : array
$replacements : array