return the current encoding
static string
getEncoding
()
concat a value in with a value of an existing template variable
void
append
(string|array $name, [mixed $value = null])
-
string|array
$name: the variable name, or an associative array 'name'=>'value'
-
mixed
$value: the value (or null if $name is an array)
append a zone content to a template variable
void
appendZone
(string $name, string $zoneName, [array $params = array()])
-
string
$name: the variable name
-
string
$zoneName: a zone selector
-
array
$params: parameters for the zone
assign a value in a template variable
void
assign
(string|array $name, [mixed $value = null])
-
string|array
$name: the variable name, or an associative array 'name'=>'value'
-
mixed
$value: the value (or null if $name is an array)
assign a value by reference in a template variable
void
assignByRef
(string $name, &$value, mixed $value)
-
string
$name: the variable name
-
mixed
$value: the value
-
&$value
assign a value in a template variable, only if the template variable doesn't exist
void
assignIfNone
(string|array $name, [mixed $value = null])
-
string|array
$name: the variable name, or an associative array 'name'=>'value'
-
mixed
$value: the value (or null if $name is an array)
assign a zone content to a template variable
void
assignZone
(string $name, string $zoneName, [array $params = array()])
-
string
$name: the variable name
-
string
$zoneName: a zone selector
-
array
$params: parameters for the zone
assign a zone content to a template variable only if this variable doesn't exist
void
assignZoneIfNone
(string $name, string $zoneName, [array $params = array()])
-
string
$name: the variable name
-
string
$zoneName: a zone selector
-
array
$params: parameters for the zone
display the generated content from the given template
void
display
(string $tpl, [string $outputtype = ''], [boolean $trusted = true])
-
string
$tpl: template selector
-
string
$outputtype: the type of output (html, text etc..)
-
boolean
$trusted: says if the template file is trusted or not
return the generated content from the given template
string
fetch
(string $tpl, [string $outputtype = ''], [boolean $trusted = true], [boolean $callMeta = true])
-
string
$tpl: template selector
-
string
$outputtype: the type of output (html, text etc..)
-
boolean
$trusted: says if the template file is trusted or not
-
boolean
$callMeta: false if meta should not be called
Return the generated content from the given string template (virtual)
string
fetchFromString
(string $tpl, [string $outputtype = ''], [boolean $trusted = true], [boolean $callMeta = true])
-
string
$tpl: template content
-
string
$outputtype: the type of output (html, text etc..)
-
boolean
$trusted: says if the template file is trusted or not
-
boolean
$callMeta: false if meta should not be called
return the value of a template variable
mixed
get
(string $name)
-
string
$name: the variable template name
include the compiled template file and call one of the generated function
string
getTemplate
(
string|jSelectorTpl $tpl, [
string $outputtype =
''], [
boolean $trusted =
true])
-
string|jSelectorTpl
$tpl: template selector
-
string
$outputtype: the type of output (html, text etc..)
-
boolean
$trusted: says if the template file is trusted or not
Return all template variables
array
getTemplateVars
()
says if a template variable exists
boolean
isAssigned
(string $name)
-
string
$name: the variable template name
process all meta instruction of a template
void
meta
(string $tpl, [string $outputtype = ''], [boolean $trusted = true])
-
string
$tpl: template selector
-
string
$outputtype: the type of output (html, text etc..)
-
boolean
$trusted: says if the template file is trusted or not
register a user function. The function should accept a jTpl object as first parameter.
void
registerFunction
(string $name, string $functionName)
-
string
$name: the name of the modifier in a template
-
string
$functionName: the corresponding PHP function
register a user modifier. The function should accept at least a string as first parameter, and should return this string which can be modified.
void
registerModifier
(string $name, string $functionName)
-
string
$name: the name of the modifier in a template
-
string
$functionName: the corresponding PHP function