\Hazaar\Text
Template
The Text\Template class

Templates are used to separate view content from application logic. These templates use a simple tag substitution technique to apply data to templates to generate content. Data can be applied to templates multiple times (in a loop for example) to generate multiple output content containing different values. This is useful for tasks such as mail-merges/mass mailouts using a pre-defined email template.

Tags are in the format of ${tagname}. This tag would reference a parameter passed to the parser with the array key value of ‘tagname’. Such as:

$tpl->parse(array('tagname' => 'Hello, World!'));

Summary
Methods Properties Constants
No constants
Properties
$__compiled_content
$__compiled_content
$__content
$__content
$__foreach_stack
$__foreach_stack
$__section_stack
$__section_stack
Static
$modifiers
$modifiers
Static
$tags
$tags
Methods
__construct()
__construct($content)

Parameters

$content

No description

compile()
compile()
compileELSE()
compileELSE($params)

Parameters

$params

No description

compileELSEIF()
compileELSEIF($params)

Parameters

$params

No description

compileENDFOREACH()
compileENDFOREACH($tag)

Parameters

$tag

No description

compileENDIF()
compileENDIF($tag)

Parameters

$tag

No description

compileENDSECTION()
compileENDSECTION($tag)

Parameters

$tag

No description

compileFOREACH()
compileFOREACH($params)

Parameters

$params

No description

compileFOREACHELSE()
compileFOREACHELSE($tag)

Parameters

$tag

No description

compileIF()
compileIF($params)

Parameters

$params

No description

compilePARAMS()
compilePARAMS($params)

Parameters

$params

No description

compileSECTION()
compileSECTION($params)

Parameters

$params

No description

compileSECTIONELSE()
compileSECTIONELSE($tag)

Parameters

$tag

No description

compileURL()
compileURL($tag)

Parameters

$tag

No description

compileVAR()
compileVAR($name)

Parameters

$name

No description

compileVARS()
compileVARS($string)

Parameters

$string

No description

loadFromString()
loadFromString($content)

Parameters

$content

No description

render()
render($params = Array ( ) )

Parameters

$params

No description

replaceVAR()
replaceVAR($name)

Parameters

$name

No description

setType()
setType($value, $type = 'string', $args = null)

Parameters

$value

No description

$type

No description

$args

No description