extends |
Smarty_Internal_TemplateBase |
---|
Main class with template data structures and methods
Methods | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public
|
__construct(
string $template_resource,
Smarty $smarty,
null|Smarty_Internal_Template|Smarty|Smarty_Internal_Data $_parent = null,
mixed $_cache_id = null,
mixed $_compile_id = null,
bool|int|null $_caching = null,
int|null $_cache_lifetime = null,
bool $_isConfig = false,
)
Create template data object
Some of the global Smarty settings copied to template scope
It load the required template…
Create template data object Some of the global Smarty settings copied to template scope It load the required template resources and caching plugins Parameters
Throws
Overrides |
# | ||||||||||||||||||||||||
public
|
render(bool $no_output_filter = true, null|bool $display = null): string
render template
render template Parameters
Throws
|
# | ||||||||||||||||||||||||
public
|
_subTemplateRender(
string $template,
mixed $cache_id,
mixed $compile_id,
integer $caching,
integer $cache_lifetime,
array $data,
int $scope,
bool $forceTplCache,
string $uid = null,
string $content_func = null,
)
Runtime function to render sub-template
Runtime function to render sub-template Parameters
Throws
|
# | ||||||||||||||||||||||||
public
|
_subTemplateRegister()
Get called sub-templates and save call count
Get called sub-templates and save call count |
# | ||||||||||||||||||||||||
public
|
_isSubTpl(): bool
Check if this is a sub template
Check if this is a sub template Returnstrue is sub template |
# | ||||||||||||||||||||||||
public
|
_assignInScope(string $varName, mixed $value, bool $nocache = false, int $scope = 0)
Assign variable in scope
Assign variable in scope Parameters
|
# | ||||||||||||||||||||||||
public
|
_checkPlugins(array $plugins)
Check if plugins are callable require file otherwise
Check if plugins are callable require file otherwise Parameters
Throws
|
# | ||||||||||||||||||||||||
public
|
_decodeProperties(Smarty_Internal_Template $tpl, array $properties, bool $cache = false): bool
This function is executed automatically when a compiled or cached template file is included
- Decode saved properties…
This function is executed automatically when a compiled or cached template file is included
Parameters
Returnsflag if compiled or cache file is valid Throws
|
# | ||||||||||||||||||||||||
public
|
compileTemplateSource()
Compiles the template
If the template is not evaluated the compiled template is saved on disk
Compiles the template If the template is not evaluated the compiled template is saved on disk Throws
|
# | ||||||||||||||||||||||||
public
|
writeCachedContent(string $content): bool
Writes the content to cache resource
Writes the content to cache resource |
# | ||||||||||||||||||||||||
public
|
_getTemplateId(): string
Get unique template id
|
# | ||||||||||||||||||||||||
public
|
capture_error()
runtime error not matching capture tags
|
# | ||||||||||||||||||||||||
public
|
loadCompiled(bool $force = false)
Load compiled object
Load compiled object Parameters
|
# | ||||||||||||||||||||||||
public
|
loadCached(bool $force = false)
Load cached object
Load cached object Parameters
|
# | ||||||||||||||||||||||||
public
|
_loadInheritance()
Load inheritance object
Load inheritance object |
# | ||||||||||||||||||||||||
public
|
_cleanUp()
Unload inheritance object
Unload inheritance object |
# | ||||||||||||||||||||||||
public
|
loadCompiler()
Load compiler object
|
# | ||||||||||||||||||||||||
public
|
__call(string $name, array $args): mixed
Handle unknown class methods
Handle unknown class methods Parameters
Overrides |
# | ||||||||||||||||||||||||
public
|
__get(string $property_name): mixed|Smarty_Template_Cached
get Smarty property in template context
get Smarty property in template context Parameters
Throws
|
# | ||||||||||||||||||||||||
public
|
__set(string $property_name, mixed $value)
set Smarty property in template context
set Smarty property in template context Parameters
Throws
|
# | ||||||||||||||||||||||||
public
|
__destruct()
Template data object destructor
Template data object destructor |
# | ||||||||||||||||||||||||
public
|
mustCompile(): bool
|
# |
Properties | |||
---|---|---|---|
public
static
|
Smarty_Internal_Template[]
|
$tplObjCache = []
|
# |
public
static
|
Smarty_Internal_Template[]
|
$isCacheTplObj = []
|
# |
public
static
|
int[]
|
$subTplInfo = []
|
# |
public
|
int
|
$_objType = 2
|
# |
public
|
Smarty
|
$smarty = null
|
# |
public
|
Smarty_Template_Source|Smarty_Template_Config
|
$source = null
|
# |
public
|
Smarty_Internal_Runtime_Inheritance
|
$inheritance = null
|
# |
public
|
string
|
$template_resource = null
|
# |
public
|
bool
|
$mustCompile = null
|
# |
public
|
null|string
|
$templateId = null
|
# |
public
|
int
|
$scope = 0
|
# |
public
|
bool
|
$isRenderingCache = false
|
# |
public
|
callback[]
|
$startRenderCallbacks = []
|
# |
public
|
callback[]
|
$endRenderCallbacks = []
|
# |
public
|
Smarty_Template_Compiled
|
$compiled
|
# |
public
|
Smarty_Template_Cached
|
$cached
|
# |
public
|
Smarty_Internal_TemplateCompilerBase
|
$compiler
|
# |
Properties inherited from Smarty_Internal_TemplateBase |
---|
$cache_id, $compile_id, $caching, $compile_check, $cache_lifetime, $tplFunctions, $_cache, |
Properties inherited from Smarty_Internal_Data |
---|
$template_class, $tpl_vars, $parent, $config_vars, $ext, |