Class Smarty_Internal_TemplateCompilerBase
Main abstract compiler class
Direct known subclasses
Package: Smarty\Compiler
Author: Uwe Tews
Located at tpl/smarty/sysplugins/smarty_internal_templatecompilerbase.php
Methods summary
abstract protected
boolean
|
#
doCompile( mixed $_content, boolean $isTemplateSource = false )
method to compile a Smarty template |
public
|
|
public
boolean
|
#
compileTemplate(
Method to compile a Smarty template |
public
string
|
#
compileTemplateSource(
Compile template source and run optional post filter |
public
string
|
|
public
string
|
|
public
string
|
#
compileTag( string $tag, array $args, array $parameter = array() )
Compile Tag This is a call back from the lexer/parser |
public
string
|
|
public
string
|
|
public
null|Smarty_Internal_ParseTree_Text
|
#
processText( string $text )
This method is called from parser to process a text content section - remove text from inheritance child templates as they may generate output - strip text if strip is enabled |
public
string
|
#
callTagCompiler( string $tag, array $args, mixed $param1 = null, mixed $param2 = null, mixed $param3 = null )
lazy loads internal compile plugin for tag and calls the compile method compile objects cached for reuse. class name format: Smarty_Internal_Compile_TagName plugin filename format: Smarty_Internal_TagName.php |
public
string
|
|
public
boolean
|
#
getPluginFromDefaultHandler( string $tag, string $plugin_type )
Check for plugins by default plugin handler |
public
string
|
#
appendCode( string $left, string $right )
Append code segments and remove unneeded ?> <?php transitions |
public
string
|
#
processNocacheCode( string $content, boolean $is_code )
Inject inline code for nocache template sections 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. |
public
boolean|string
|
|
public
boolean|string
|
|
public
|
|
public
integer|string
|
|
public
string
|
|
public
|
#
trigger_template_error( string $args = null, string $line = null, null|boolean $tagline = null )
display compiler error messages without dying 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 |
public
string
|
|
public
boolean|integer
|
|
public
string
|
|
public
string
|
|
public
|
|
public
string
|
Magic methods summary
public
|
|
public
|
Properties summary
public
|
$smarty
Smarty object |
#
null
|
public
|
$parser
Parser object |
#
null
|
public
mixed
|
$nocache_hash
hash for nocache sections |
#
null
|
public
boolean
|
$suppressNocacheProcessing
suppress generation of nocache code |
#
false
|
public static
array
|
$_tag_objects
compile tag objects cache |
#
array()
|
public
array
|
$_tag_stack
tag stack |
#
array()
|
public
|
$template
current template |
#
null
|
public
array
|
$mergedSubTemplatesData
merged included sub template data |
#
array()
|
public
array
|
$mergedSubTemplatesCode
merged sub template code |
#
array()
|
public
array
|
$templateProperties
collected template properties during compilation |
#
array()
|
public
integer
|
$trace_line_offset
source line offset for error messages |
#
0
|
public
string
|
$trace_uid
trace uid |
#
''
|
public
string
|
$trace_filepath
trace file path |
#
''
|
public
array
|
$trace_stack
stack for tracing file and line of nested {block} tags |
#
array()
|
public
array
|
$default_handler_plugins
plugins loaded by default plugin handler |
#
array()
|
public
mixed
|
$default_modifier_list
saved preprocessed modifier list |
#
null
|
public
boolean
|
$forceNocache
force compilation of complete template as nocache |
#
false
|
public
boolean
|
$write_compiled_code
flag if compiled template file shall we written |
#
true
|
public
array
|
$tpl_function
Template functions |
#
array()
|
public
array
|
$called_functions
called sub functions from template function |
#
array()
|
public
string
|
$blockOrFunctionCode
compiled template or block function code |
#
''
|
public
integer
|
$php_handling
php_handling setting either from Smarty or security |
#
0
|
public
array
|
$modifier_plugins
flags for used modifier plugins |
#
array()
|
public
array
|
$known_modifier_type
type of already compiled modifier |
#
array()
|
public
|
$parent_compiler
parent compiler object for merged subtemplates and template functions |
#
null
|
public
boolean
|
$nocache
Flag true when compiling nocache section |
#
false
|
public
boolean
|
$tag_nocache
Flag true when tag is compiled as nocache |
#
false
|
public
array
|
$prefix_code
Compiled tag prefix code |
#
array()
|
public
array
|
$prefixCodeStack
Prefix code stack |
#
array()
|
public
boolean
|
$has_code
Tag has compiled code |
#
false
|
public
boolean
|
$has_variable_string
A variable string was compiled |
#
false
|
public
boolean
|
$has_output
Tag creates output |
#
false
|
public
array
|
$variable_filter_stack
Stack for {setfilter} {/setfilter} |
#
array()
|
public
array
|
$variable_filters
variable filters for {setfilter} {/setfilter} |
#
array()
|
public
integer
|
$loopNesting
Nesting count of looping tags like {foreach}, {for}, {section}, {while} |
#
0
|
public
string
|
$stripRegEx
Strip preg pattern |
#
'![\t ]*[\r\n]+[\t ]*!'
|
public
array
|
$plugin_search_order
plugin search order |
#
array('function', 'block', 'compiler', 'class')
|
public
array
|
$_cache
General storage area for tag compiler plugins |
#
array()
|
public static
integer
|
$prefixVariableNumber
counter for prefix variable number |
#
0
|
Magic properties
public
|
$prefixCompiledCode
= '' |
public
|
$postfixCompiledCode
= '' |