Smarty_Compiler Smarty_Compiler(
)
|
|
The class constructor.
void _add_plugin(
string
$type, string
$name, [boolean?
$delayed_loading = null]
)
|
|
add plugin
Parameters:
string |
$type: |
|
string |
$name: |
|
boolean? |
$delayed_loading: |
|
void _compile_arg_list(
$type,
$name,
$attrs,
&$cache_code
)
|
|
Parameters:
|
$type: |
|
|
$name: |
|
|
$attrs: |
|
|
&$cache_code: |
|
boolean _compile_block_tag(
string
$tag_command, string
$tag_args, string
$tag_modifier,
&$output, string
$output
)
|
|
compile block function tag
sets $output to compiled block function tag
Parameters:
string |
$tag_command: |
|
string |
$tag_args: |
|
string |
$tag_modifier: |
|
string |
$output: |
|
|
&$output: |
|
string _compile_capture_tag(
boolean
$start, [string
$tag_args = '']
)
|
|
Compile {capture} .. {/capture} tags
Parameters:
boolean |
$start: |
true if this is the {capture} tag |
string |
$tag_args: |
|
boolean _compile_compiler_tag(
string
$tag_command, string
$tag_args,
&$output, string
$output
)
|
|
compile the custom compiler tag
sets $output to the compiled custom compiler tag
Parameters:
string |
$tag_command: |
|
string |
$tag_args: |
|
string |
$output: |
|
|
&$output: |
|
string _compile_custom_tag(
string
$tag_command, string
$tag_args, string
$tag_modifier
)
|
|
compile custom function tag
Parameters:
string |
$tag_command: |
|
string |
$tag_args: |
|
string |
$tag_modifier: |
|
true _compile_file(
string
$resource_name, string
$source_content,
&$compiled_content, string
$compiled_content
)
|
|
compile a resource
sets $compiled_content to the compiled source
Parameters:
string |
$resource_name: |
|
string |
$source_content: |
|
string |
$compiled_content: |
|
|
&$compiled_content: |
|
string _compile_foreach_start(
string
$tag_args
)
|
|
Compile {foreach ...} tag.
Parameters:
string _compile_if_tag(
string
$tag_args, [boolean
$elseif = false]
)
|
|
Compile {if ...} tag
Parameters:
string |
$tag_args: |
|
boolean |
$elseif: |
if true, uses elseif instead of if |
string _compile_include_php_tag(
string
$tag_args
)
|
|
Compile {include ...} tag
Parameters:
string _compile_include_tag(
string
$tag_args
)
|
|
Compile {include ...} tag
Parameters:
string _compile_insert_tag(
string
$tag_args
)
|
|
Compile {insert ...} tag
Parameters:
string _compile_plugin_call(
string
$type, string
$name
)
|
|
compiles call to plugin of type $type with name $name
returns a string containing the function-name or method call without the paramter-list that would have follow to make the call valid php-syntax
Parameters:
string |
$type: |
|
string |
$name: |
|
string _compile_registered_object_tag(
string
$tag_command, array
$attrs, string
$tag_modifier
)
|
|
compile a registered object tag
Parameters:
string |
$tag_command: |
|
array |
$attrs: |
|
string |
$tag_modifier: |
|
string _compile_section_start(
string
$tag_args
)
|
|
Compile {section ...} tag
Parameters:
string _compile_smarty_ref(
&$indexes, string
$indexes
)
|
|
Compiles references of type $smarty.foo
Parameters:
string |
$indexes: |
|
|
&$indexes: |
|
string _compile_tag(
string
$template_tag
)
|
|
Compile a template tag
Parameters:
string _expand_quoted_text(
string
$var_expr
)
|
|
expand quoted text with embedded variables
Parameters:
load pre- and post-filters
array _parse_attrs(
string
$tag_args
)
|
|
Parse attribute string
Parameters:
void _parse_conf_var(
string
$conf_var_expr
)
|
|
parse configuration variable expression into PHP code
Parameters:
array _parse_is_expr(
string
$is_arg, array
$tokens
)
|
|
Parse is expression
Parameters:
string |
$is_arg: |
|
array |
$tokens: |
|
void _parse_modifiers(
&$output, string
$modifier_string, string
$output
)
|
|
parse modifier chain into PHP code
sets $output to parsed modified chain
Parameters:
string |
$output: |
|
string |
$modifier_string: |
|
|
&$output: |
|
string _parse_parenth_args(
string
$parenth_args
)
|
|
parse arguments in function call parenthesis
Parameters:
string _parse_section_prop(
string
$section_prop_expr
)
|
|
parse section property expression into PHP code
Parameters:
string |
$section_prop_expr: |
|
string _parse_var(
string
$var_expr, string
$output
)
|
|
parse variable expression into PHP code
Parameters:
string |
$var_expr: |
|
string |
$output: |
|
void _parse_vars_props(
&$tokens, array
$tokens
)
|
|
compile multiple variables and section properties tokens into PHP code
Parameters:
string _parse_var_props(
string
$val, string
$tag_attrs
)
|
|
compile single variable and section properties token into PHP code
Parameters:
string |
$val: |
|
string |
$tag_attrs: |
|
string _pop_cacheable_state(
$type,
$name
)
|
|
check if the compilation changes from non-cacheable to cacheable state with the end of the current plugin return php-code to reflect the transition.
Parameters:
string _push_cacheable_state(
$type,
$name
)
|
|
check if the compilation changes from cacheable to non-cacheable state with the beginning of the current plugin. return php-code to reflect the transition.
Parameters:
string _quote_replace(
string
$string
)
|
|
Quote subpattern references
Parameters:
void _syntax_error(
string
$error_msg, [integer
$error_type = E_USER_ERROR], [string
$file = null], [integer
$line = null]
)
|
|
display Smarty syntax error
Parameters:
string |
$error_msg: |
|
integer |
$error_type: |
|
string |
$file: |
|
integer |
$line: |
|