template engine
| package |
jelix |
|---|---|
| subpackage |
jtpl |
__construct()
append(string|array $name, mixed $value = null)
string|arraythe variable name, or an associative array 'name'=>'value'
mixedthe value (or null if $name is an array)
appendZone(string $name, string $zoneName, array $params = array())
| see | \jZone |
|---|---|
| since | 1.0 |
stringthe variable name
stringa zone selector
arrayparameters for the zone
assign(string|array $name, mixed $value = null)
string|arraythe variable name, or an associative array 'name'=>'value'
mixedthe value (or null if $name is an array)
assignByRef(string $name, mixed &$value)
| since |
jelix 1.1 |
|---|---|
stringthe variable name
mixedthe value
assignIfNone(string|array $name, mixed $value = null)
string|arraythe variable name, or an associative array 'name'=>'value'
mixedthe value (or null if $name is an array)
assignZone(string $name, string $zoneName, array $params = array())
| see | \jZone |
|---|---|
stringthe variable name
stringa zone selector
arrayparameters for the zone
assignZoneIfNone(string $name, string $zoneName, array $params = array())
| see | \jZone |
|---|---|
stringthe variable name
stringa zone selector
arrayparameters for the zone
display(string $tpl, string $outputtype = '', boolean $trusted = true)
stringtemplate selector
stringthe type of output (html, text etc..)
booleansays if the template file is trusted or not
fetch(string $tpl, string $outputtype = '', boolean $trusted = true, boolean $callMeta = true) : string
| Throws |
|
|---|
stringtemplate selector
stringthe type of output (html, text etc..)
booleansays if the template file is trusted or not
booleanfalse if meta should not be called
stringthe generated content
fetchFromString(string $tpl, string $outputtype = '', boolean $trusted = true, boolean $callMeta = true) : string
| Throws |
|
|---|
stringtemplate content
stringthe type of output (html, text etc..)
booleansays if the template file is trusted or not
booleanfalse if meta should not be called
stringthe generated content
get(string $name) : mixed
stringthe variable template name
mixedthe value (or null if it isn't exist)
getEncoding() : string
| since | 1.0b2 |
|---|---|
stringthe charset string
getTemplate(string|\jSelectorTpl $tpl, string $outputtype = '', boolean $trusted = true) : string
| Throws |
|
|---|
stringthe type of output (html, text etc..)
booleansays if the template file is trusted or not
stringthe suffix name of the function to call
getTemplateVars() : array
array
isAssigned(string $name) : boolean
stringthe variable template name
booleantrue if the variable exists
registerFunction(string $name, string $functionName)
| since |
jelix 1.1 |
|---|---|
stringthe name of the modifier in a template
stringthe corresponding PHP function
registerModifier(string $name, string $functionName)
| since |
jelix 1.1 |
|---|---|
stringthe name of the modifier in a template
stringthe corresponding PHP function
_vars : array
It have a public access only for plugins. So you musn't use directly this property except from tpl plugins. See methods of jTpl to manage template variables
| var |
|---|
array
_privateVars : array
It have a public access only for plugins. So you musn't use directly this property except from tpl plugins.
| var |
|---|
array
_templateName : string
| var | |
|---|---|
| since |
string
recursiveTpl :
processedMeta :
userModifiers :
userFunctions :