jTpl
extends CastorCore
in package
template engine.
Tags
Table of Contents
- __construct() : mixed
- appendZone() : mixed
- append a zone content to a template variable.
- assignZone() : mixed
- assign a zone content to a template variable.
- assignZoneIfNone() : mixed
- assign a zone content to a template variable only if this variable doesn't exist.
- display() : mixed
- display the generated content from the given template.
- fetch() : string
- return the generated content from the given template.
- getEncoding() : string
- return the current encoding.
- meta() : array<string|int, mixed>
- process all meta instruction of a template.
- compilationNeeded() : mixed
- getCachePath() : mixed
- getCompiler() : mixed
- getTemplate() : string
- include the compiled template file and call one of the generated function.
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —appendZone()
append a zone content to a template variable.
public
appendZone(string $name, string $zoneName[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $name : string
-
the variable name
- $zoneName : string
-
a zone selector
- $params : array<string|int, mixed> = array()
-
parameters for the zone
Tags
Return values
mixed —assignZone()
assign a zone content to a template variable.
public
assignZone(string $name, string $zoneName[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $name : string
-
the variable name
- $zoneName : string
-
a zone selector
- $params : array<string|int, mixed> = array()
-
parameters for the zone
Tags
Return values
mixed —assignZoneIfNone()
assign a zone content to a template variable only if this variable doesn't exist.
public
assignZoneIfNone(string $name, string $zoneName[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $name : string
-
the variable name
- $zoneName : string
-
a zone selector
- $params : array<string|int, mixed> = array()
-
parameters for the zone
Tags
Return values
mixed —display()
display the generated content from the given template.
public
display(string $tpl[, string $outputtype = '' ][, bool $trusted = true ]) : mixed
Parameters
- $tpl : string
-
template selector
- $outputtype : string = ''
-
the type of output (html, text etc..)
- $trusted : bool = true
-
says if the template file is trusted or not
Tags
Return values
mixed —fetch()
return the generated content from the given template.
public
fetch(string $tpl[, string $outputtype = '' ][, bool $trusted = true ][, bool $callMeta = true ]) : string
Parameters
- $tpl : string
-
template selector
- $outputtype : string = ''
-
the type of output (html, text etc..)
- $trusted : bool = true
-
says if the template file is trusted or not
- $callMeta : bool = true
-
false if meta should not be called
Tags
Return values
string —the generated content
getEncoding()
return the current encoding.
public
getEncoding() : string
Tags
Return values
string —the charset string
meta()
process all meta instruction of a template.
public
meta(string $tpl[, string $outputtype = '' ][, bool $trusted = true ]) : array<string|int, mixed>
Parameters
- $tpl : string
-
template selector
- $outputtype : string = ''
-
the type of output (html, text etc..)
- $trusted : bool = true
-
says if the template file is trusted or not
Tags
Return values
array<string|int, mixed> —compilationNeeded()
protected
compilationNeeded(mixed $cacheFile) : mixed
Parameters
- $cacheFile : mixed
Tags
Return values
mixed —getCachePath()
protected
getCachePath() : mixed
Tags
Return values
mixed —getCompiler()
protected
getCompiler() : mixed
Tags
Return values
mixed —getTemplate()
include the compiled template file and call one of the generated function.
protected
getTemplate(jSelectorTpl|string $tpl[, string $outputtype = '' ][, bool $trusted = true ]) : string
Parameters
- $tpl : jSelectorTpl|string
-
template selector
- $outputtype : string = ''
-
the type of output (html, text etc..)
- $trusted : bool = true
-
says if the template file is trusted or not
Tags
Return values
string —the suffix name of the function to call