| package |
Smarty |
| subpackage |
Compiler |
Methods
Initialize compiler
__construct(string $lexer_class, string $parser_class, \Smarty $smarty)
Parameters
$lexer_class
stringclass name
$parser_class
stringclass name
lazy loads internal compile plugin for tag and calls the compile methode
callTagCompiler(string $tag, array $args, mixed $param1, mixed $param2, mixed $param3) : string
Inherited
compile objects cached for reuse.
class name format: Smarty_Internal_Compile_TagName
plugin filename format: Smarty_Internal_Tagname.php
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::callTagCompiler() |
Parameters
$args
arraylist of tag attributes
$param1
mixedoptional parameter
$param2
mixedoptional parameter
$param3
mixedoptional parameter
Returns
stringcompiled code
Compile Tag
compileTag(string $tag, array $args, array $parameter) : string
Inherited
This is a call back from the lexer/parser
It executes the required compile plugin for the Smarty tag
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::compileTag() |
Parameters
$args
arrayarray with tag attributes
$parameter
arrayarray with compilation parameter
Returns
stringcompiled code
Method to compile a Smarty template
compileTemplate(\Smarty_Internal_Template $template) : bool
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::compileTemplate() |
Parameters
Returns
booltrue if compiling succeeded, false if it failed
Check for plugins and return function name
getPlugin($plugin_name, string $plugin_type) : string
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::getPlugin() |
Parameters
$plugin_name
$plugin_type
stringtype of plugin
Returns
stringcall name of function
Check for plugins by default plugin handler
getPluginFromDefaultHandler(string $tag, string $plugin_type) : boolean
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::getPluginFromDefaultHandler() |
Parameters
$plugin_type
stringtype of plugin
Returns
booleantrue if found
Inject inline code for nocache template sections
processNocacheCode(string $content, boolean $is_code) : string
Inherited
This method gets the content of each template element from the parser.
If the content is compiled code and it should be not cached the code is injected
into the rendered output.
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::processNocacheCode() |
Parameters
$content
stringcontent of template element
$is_code
booleantrue if content is compiled code
Returns
stringcontent
display compiler error messages without dying
trigger_template_error(string $args, string $line)
Inherited
If parameter $args is empty it is a parser detected syntax error.
In this case the parser is called to obtain information about expected tokens.
If parameter $args contains a string this is used as error message
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::trigger_template_error() |
Parameters
$args
stringindividual error message or null
Exceptions
Methode to compile a Smarty template
doCompile(mixed $_content) : bool
Parameters
$_content
mixedtemplate source
Returns
booltrue if compiling succeeded, false if it failed
Properties
$_tag_objects : array
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$_tag_objects |
$_tag_stack : array
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$_tag_stack |
$called_functions : array
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$called_functions |
$compiles_template_function : bool
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$compiles_template_function |
$default_handler_plugins : array
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$default_handler_plugins |
$default_modifier_list : mixed
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$default_modifier_list |
$forceNocache : boolean
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$forceNocache |
$inheritance : bool
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$inheritance |
$known_modifier_type : array
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$known_modifier_type |
$merged_templates : array
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$merged_templates |
$modifier_plugins : array
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$modifier_plugins |
$suppressMergedTemplates : bool
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$suppressMergedTemplates |
$suppressNocacheProcessing : bool
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$suppressNocacheProcessing |
$write_compiled_code : bool
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$write_compiled_code |
$nocache_hash : mixed
Inherited
| inherited_from |
\Smarty_Internal_TemplateCompilerBase::$$nocache_hash |