Class Smarty_Internal_TemplateCompilerBase

Description

Main abstract compiler class

  • abstract:

Located in /libs/sysplugins/smarty_internal_templatecompilerbase.php (line 19)


	
			
Direct descendents
Class Description
Smarty_Internal_SmartyTemplateCompiler Class SmartyTemplateCompiler
Variable Summary
Method Summary
Smarty_Internal_TemplateCompilerBase __construct ()
string callTagCompiler (string $tag, array $args, [mixed $param1 = null], [mixed $param2 = null], [mixed $param3 = null])
string compileTag (string $tag, array $args, [array $parameter = array()])
bool doCompile (mixed $_content)
string getPlugin ( $plugin_name, string $plugin_type, string $pugin_name)
boolean getPluginFromDefaultHandler (string $tag, string $plugin_type)
string processNocacheCode (string $content, boolean $is_code)
void trigger_template_error ([string $args = null], [string $line = null])
Variables
static array $_tag_objects = array() (line 47)

compile tag objects

  • access: public
array $called_functions = array() (line 131)

called subfuntions from template function

  • access: public
bool $compiles_template_function = false (line 125)

flag if currently a template function is compiled

  • access: public
array $default_handler_plugins = array() (line 82)

plugins loaded by default plugin handler

  • access: public
mixed $default_modifier_list = null (line 89)

saved preprocessed modifier list

  • access: public
boolean $forceNocache = false (line 95)

force compilation of complete template as nocache

  • access: public
bool $inheritance = false (line 75)

flag when compiling {block}

  • access: public
array $known_modifier_type = array() (line 143)

type of already compiled modifier

  • access: public
array $merged_templates = array() (line 68)

merged templates

  • access: public
array $modifier_plugins = array() (line 137)

flags for used modifier plugins

  • access: public
bool $suppressFilter = false (line 113)

suppress pre and post filter

  • access: public
bool $suppressHeader = false (line 101)

suppress Smarty header code in compiled template

  • access: public
bool $suppressMergedTemplates = false (line 40)

suppress generation of merged template code

  • access: public
bool $suppressNocacheProcessing = false (line 33)

suppress generation of nocache code

  • access: public
bool $suppressTemplatePropertyHeader = false (line 107)

suppress template property header code in compiled template

  • access: public
Smarty_Internal_Template $template = null (line 61)

current template

  • access: public
bool $write_compiled_code = true (line 119)

flag if compiled template file shall we written

  • access: public
array $_tag_stack = array() (line 54)

tag stack

  • access: public
Methods
Constructor __construct (line 156)

Initialize compiler

  • access: public
Smarty_Internal_TemplateCompilerBase __construct ()

Redefined in descendants as:
callTagCompiler (line 471)

lazy loads internal compile plugin for tag and calls the compile methode

compile objects cached for reuse. class name format: Smarty_Internal_Compile_TagName plugin filename format: Smarty_Internal_Tagname.php

  • return: compiled code
  • access: public
string callTagCompiler (string $tag, array $args, [mixed $param1 = null], [mixed $param2 = null], [mixed $param3 = null])
  • string $tag: tag name
  • array $args: list of tag attributes
  • mixed $param1: optional parameter
  • mixed $param2: optional parameter
  • mixed $param3: optional parameter
compileTag (line 244)

Compile Tag

This is a call back from the lexer/parser It executes the required compile plugin for the Smarty tag

  • return: compiled code
  • access: public
string compileTag (string $tag, array $args, [array $parameter = array()])
  • string $tag: tag name
  • array $args: array with tag attributes
  • array $parameter: array with compilation parameter
compileTemplate (line 166)

Method to compile a Smarty template

  • return: true if compiling succeeded, false if it failed
  • access: public
bool compileTemplate (Smarty_Internal_Template $template)
doCompile (line 151)

Methode to compile a Smarty template

  • return: true if compiling succeeded, false if it failed
  • abstract:
  • access: protected
bool doCompile (mixed $_content)
  • mixed $_content: template source

Redefined in descendants as:
getPlugin (line 499)

Check for plugins and return function name

  • return: call name of function
  • access: public
string getPlugin ( $plugin_name, string $plugin_type, string $pugin_name)
  • string $pugin_name: name of plugin or function
  • string $plugin_type: type of plugin
  • $plugin_name
getPluginFromDefaultHandler (line 553)

Check for plugins by default plugin handler

  • return: true if found
  • access: public
boolean getPluginFromDefaultHandler (string $tag, string $plugin_type)
  • string $tag: name of tag
  • string $plugin_type: type of plugin
processNocacheCode (line 600)

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.

  • return: content
  • access: public
string processNocacheCode (string $content, boolean $is_code)
  • string $content: content of template element
  • boolean $is_code: true if content is compiled code
trigger_template_error (line 640)

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

  • throws: SmartyCompilerException when an unexpected token is found
  • access: public
void trigger_template_error ([string $args = null], [string $line = null])
  • string $args: individual error message or null
  • string $line: line-number

Documentation generated on Mon, 17 Jun 2013 21:06:50 +0000 by phpDocumentor 1.4.3