Public Member Functions | Data Fields

Smarty_Compiler Class Reference

Inheritance diagram for Smarty_Compiler:
Smarty

Public Member Functions

 Smarty_Compiler ()
 _compile_file ($resource_name, $source_content, &$compiled_content)
 _compile_tag ($template_tag)
 _compile_compiler_tag ($tag_command, $tag_args, &$output)
 _compile_block_tag ($tag_command, $tag_args, $tag_modifier, &$output)
 _compile_custom_tag ($tag_command, $tag_args, $tag_modifier, &$output)
 _compile_registered_object_tag ($tag_command, $attrs, $tag_modifier)
 _compile_insert_tag ($tag_args)
 _compile_include_tag ($tag_args)
 _compile_include_php_tag ($tag_args)
 _compile_section_start ($tag_args)
 _compile_foreach_start ($tag_args)
 _compile_capture_tag ($start, $tag_args= '')
 _compile_if_tag ($tag_args, $elseif=false)
 _compile_arg_list ($type, $name, $attrs, &$cache_code)
 _parse_is_expr ($is_arg, $tokens)
 _parse_attrs ($tag_args)
 _parse_vars_props (&$tokens)
 _parse_var_props ($val)
 _expand_quoted_text ($var_expr)
 _parse_var ($var_expr)
 _parse_parenth_args ($parenth_args)
 _parse_conf_var ($conf_var_expr)
 _parse_section_prop ($section_prop_expr)
 _parse_modifiers (&$output, $modifier_string)
 _add_plugin ($type, $name, $delayed_loading=null)
 _compile_smarty_ref (&$indexes)
 _compile_plugin_call ($type, $name)
 _load_filters ()
 _quote_replace ($string)
 _syntax_error ($error_msg, $error_type=E_USER_ERROR, $file=null, $line=null)
 _push_cacheable_state ($type, $name)
 _pop_cacheable_state ($type, $name)
 _push_tag ($open_tag)
 _pop_tag ($close_tag)

Data Fields

 $_folded_blocks = array()
 $_current_file = null
 $_current_line_no = 1
 $_capture_stack = array()
 $_plugin_info = array()
 $_init_smarty_vars = false
 $_permitted_tokens = array('true','false','yes','no','on','off','null')
 $_db_qstr_regexp = null
 $_si_qstr_regexp = null
 $_qstr_regexp = null
 $_func_regexp = null
 $_reg_obj_regexp = null
 $_var_bracket_regexp = null
 $_num_const_regexp = null
 $_dvar_guts_regexp = null
 $_dvar_regexp = null
 $_cvar_regexp = null
 $_svar_regexp = null
 $_avar_regexp = null
 $_mod_regexp = null
 $_var_regexp = null
 $_parenth_param_regexp = null
 $_func_call_regexp = null
 $_obj_ext_regexp = null
 $_obj_start_regexp = null
 $_obj_params_regexp = null
 $_obj_call_regexp = null
 $_cacheable_state = 0
 $_cache_attrs_count = 0
 $_nocache_count = 0
 $_cache_serial = null
 $_cache_include = null
 $_strip_depth = 0
 $_additional_newline = "\n"

Detailed Description

Definition at line 35 of file Smarty_Compiler.class.php.


Member Function Documentation

_add_plugin ( type,
name,
delayed_loading = null 
)

add plugin

Parameters:
string$type
string$name
boolean?$delayed_loading

Definition at line 1958 of file Smarty_Compiler.class.php.

_compile_block_tag ( tag_command,
tag_args,
tag_modifier,
&$  output 
)

compile block function tag

sets $output to compiled block function tag

Parameters:
string$tag_command
string$tag_args
string$tag_modifier
string$output
Returns:
boolean

Definition at line 665 of file Smarty_Compiler.class.php.

_compile_capture_tag ( start,
tag_args = '' 
)

Compile {capture} .. {/capture} tags

Parameters:
boolean$starttrue if this is the {capture} tag
string$tag_args
Returns:
string

Definition at line 1205 of file Smarty_Compiler.class.php.

_compile_compiler_tag ( tag_command,
tag_args,
&$  output 
)

compile the custom compiler tag

sets $output to the compiled custom compiler tag

Parameters:
string$tag_command
string$tag_args
string$output
Returns:
boolean

Definition at line 596 of file Smarty_Compiler.class.php.

_compile_custom_tag ( tag_command,
tag_args,
tag_modifier,
&$  output 
)

compile custom function tag

Parameters:
string$tag_command
string$tag_args
string$tag_modifier
Returns:
string

Definition at line 756 of file Smarty_Compiler.class.php.

_compile_file ( resource_name,
source_content,
&$  compiled_content 
)

compile a resource

sets $compiled_content to the compiled source

Parameters:
string$resource_name
string$source_content
string$compiled_content
Returns:
true

Definition at line 225 of file Smarty_Compiler.class.php.

_compile_foreach_start ( tag_args )

Compile {foreach ...} tag.

Parameters:
string$tag_args
Returns:
string

Definition at line 1144 of file Smarty_Compiler.class.php.

_compile_if_tag ( tag_args,
elseif = false 
)

Compile {if ...} tag

Parameters:
string$tag_args
boolean$elseifif true, uses elseif instead of if
Returns:
string

Definition at line 1240 of file Smarty_Compiler.class.php.

_compile_include_php_tag ( tag_args )

Compile {include ...} tag

Parameters:
string$tag_args
Returns:
string

Definition at line 1007 of file Smarty_Compiler.class.php.

_compile_include_tag ( tag_args )

Compile {include ...} tag

Parameters:
string$tag_args
Returns:
string

Definition at line 954 of file Smarty_Compiler.class.php.

_compile_insert_tag ( tag_args )

Compile {insert ...} tag

Parameters:
string$tag_args
Returns:
string

Definition at line 920 of file Smarty_Compiler.class.php.

_compile_plugin_call ( type,
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
Returns:
string

Definition at line 2133 of file Smarty_Compiler.class.php.

_compile_registered_object_tag ( tag_command,
attrs,
tag_modifier 
)

compile a registered object tag

Parameters:
string$tag_command
array$attrs
string$tag_modifier
Returns:
string

Definition at line 828 of file Smarty_Compiler.class.php.

_compile_section_start ( tag_args )

Compile {section ...} tag

Parameters:
string$tag_args
Returns:
string

Definition at line 1039 of file Smarty_Compiler.class.php.

_compile_smarty_ref ( &$  indexes )

Compiles references of type $smarty.foo

Parameters:
string$indexes
Returns:
string

Definition at line 1977 of file Smarty_Compiler.class.php.

_compile_tag ( template_tag )

Compile a template tag

Parameters:
string$template_tag
Returns:
string

Definition at line 425 of file Smarty_Compiler.class.php.

_expand_quoted_text ( var_expr )

expand quoted text with embedded variables

Parameters:
string$var_expr
Returns:
string

Definition at line 1665 of file Smarty_Compiler.class.php.

_load_filters (  )

load pre- and post-filters

Definition at line 2157 of file Smarty_Compiler.class.php.

_parse_attrs ( tag_args )

Parse attribute string

Parameters:
string$tag_args
Returns:
array

Definition at line 1506 of file Smarty_Compiler.class.php.

_parse_conf_var ( conf_var_expr )

parse configuration variable expression into PHP code

Parameters:
string$conf_var_expr

Definition at line 1843 of file Smarty_Compiler.class.php.

_parse_is_expr ( is_arg,
tokens 
)

Parse is expression

Parameters:
string$is_arg
array$tokens
Returns:
array

Definition at line 1445 of file Smarty_Compiler.class.php.

_parse_modifiers ( &$  output,
modifier_string 
)

parse modifier chain into PHP code

sets $output to parsed modified chain

Parameters:
string$output
string$modifier_string

Definition at line 1889 of file Smarty_Compiler.class.php.

_parse_parenth_args ( parenth_args )

parse arguments in function call parenthesis

Parameters:
string$parenth_args
Returns:
string

Definition at line 1826 of file Smarty_Compiler.class.php.

_parse_section_prop ( section_prop_expr )

parse section property expression into PHP code

Parameters:
string$section_prop_expr
Returns:
string

Definition at line 1864 of file Smarty_Compiler.class.php.

_parse_var ( var_expr )

parse variable expression into PHP code

Parameters:
string$var_expr
string$output
Returns:
string

Definition at line 1691 of file Smarty_Compiler.class.php.

_parse_var_props ( val )

compile single variable and section properties token into PHP code

Parameters:
string$val
string$tag_attrs
Returns:
string

Definition at line 1605 of file Smarty_Compiler.class.php.

_parse_vars_props ( &$  tokens )

compile multiple variables and section properties tokens into PHP code

Parameters:
array$tokens

Definition at line 1590 of file Smarty_Compiler.class.php.

_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.

Returns:
string

Definition at line 2231 of file Smarty_Compiler.class.php.

_pop_tag ( close_tag )

pop closing tag-name raise an error if this stack-top doesn't match with the closing tag

Parameters:
stringthe closing tag's name
Returns:
string the opening tag's name

Definition at line 2256 of file Smarty_Compiler.class.php.

_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.

Returns:
string

Definition at line 2213 of file Smarty_Compiler.class.php.

_push_tag ( open_tag )

push opening tag-name, file-name and line-number on the tag-stack

Parameters:
stringthe opening tag's name

Definition at line 2245 of file Smarty_Compiler.class.php.

_quote_replace ( string )

Quote subpattern references

Parameters:
string$string
Returns:
string

Definition at line 2188 of file Smarty_Compiler.class.php.

_syntax_error ( error_msg,
error_type = E_USER_ERROR,
file = null,
line = null 
)

display Smarty syntax error

Parameters:
string$error_msg
integer$error_type
string$file
integer$line

Definition at line 2201 of file Smarty_Compiler.class.php.

#@- The class constructor.

Definition at line 81 of file Smarty_Compiler.class.php.


Field Documentation

$_folded_blocks = array()

#@+ private

Definition at line 41 of file Smarty_Compiler.class.php.


The documentation for this class was generated from the following file: