Tpl_Processor
in package
TPL.
$return = Tpl_Processor::instance()
->tpl('TplName')
->process();
echo $return;
Tags
Table of Contents
Properties
- $instance : mixed
- The singleton instances.
- $_entities : array<string|int, mixed>
- List of children entities
- $_smarty : Smarty
- $_tpl : Xsl_Model
- XSL
- $_vars : array<string|int, mixed>
- Variables/objects to the TPL-template
Methods
- clear() : self
- Clear XSL
- clearCompiledTemplate() : self
- Clear entire compile directory
- entities() : self
- Set entities
- format() : string
- Format TPL variables
- getTemplateVars() : mixed
- getTemplateVars
- getTpl() : Tpl_Model
- Get TPL
- hideOutput() : mixed
- Hide Function Output e.g. {$object->xyz()|hideOutput}
- instance() : object
- Register an existing instance as a singleton.
- process() : mixed
- Execute processor
- tpl() : self
- Set XSL
- vars() : self
- Set vars
- __construct() : mixed
- Constructor.
Properties
$instance
The singleton instances.
public
static mixed
$instance
= \NULL
$_entities
List of children entities
protected
array<string|int, mixed>
$_entities
= array()
$_smarty
protected
Smarty
$_smarty
= \NULL
$_tpl
XSL
protected
Xsl_Model
$_tpl
= \NULL
$_vars
Variables/objects to the TPL-template
protected
array<string|int, mixed>
$_vars
= array()
Methods
clear()
Clear XSL
public
clear() : self
Return values
selfclearCompiledTemplate()
Clear entire compile directory
public
clearCompiledTemplate() : self
Return values
selfentities()
Set entities
public
entities(array<string|int, mixed> $entities) : self
Parameters
- $entities : array<string|int, mixed>
Return values
selfformat()
Format TPL variables
public
format() : string
Return values
stringgetTemplateVars()
getTemplateVars
public
static getTemplateVars(mixed $params, mixed $smarty) : mixed
Parameters
- $params : mixed
- $smarty : mixed
getTpl()
Get TPL
public
getTpl() : Tpl_Model
Return values
Tpl_ModelhideOutput()
Hide Function Output e.g. {$object->xyz()|hideOutput}
public
static hideOutput(mixed $str) : mixed
Parameters
- $str : mixed
instance()
Register an existing instance as a singleton.
public
static instance() : object
Return values
objectprocess()
Execute processor
public
process() : mixed
Tags
tpl()
Set XSL
public
tpl(Tpl_Model $oTpl) : self
Parameters
- $oTpl : Tpl_Model
Return values
selfvars()
Set vars
public
vars(array<string|int, mixed> $vars) : self
Parameters
- $vars : array<string|int, mixed>
Return values
self__construct()
Constructor.
protected
__construct() : mixed