[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/libraries/Smarty/libs/sysplugins/ -> smarty_internal_templatecompilerbase.php (summary)

Smarty Internal Plugin Smarty Template Compiler Base This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser

Author: Uwe Tews
File Size: 626 lines (29 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  __construct()
  compileTemplate()
  compileTag()
  callTagCompiler()
  getPlugin()
  getPluginFromDefaultHandler()
  processNocacheCode()
  trigger_template_error()

Functions
Functions that are not part of a class:

__construct()   X-Ref
Initialize compiler


compileTemplate(Smarty_Internal_Template $template)   X-Ref
Method to compile a Smarty template

param: Smarty_Internal_Template $template template object to compile
return: bool true if compiling succeeded, false if it failed

compileTag($tag, $args, $parameter = array()   X-Ref
Compile Tag

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

param: string $tag       tag name
param: array  $args      array with tag attributes
param: array  $parameter array with compilation parameter
return: string compiled code

callTagCompiler($tag, $args, $param1 = null, $param2 = null, $param3 = null)   X-Ref
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

param: string $tag   tag name
param: array $args   list of tag attributes
param: mixed $param1 optional parameter
param: mixed $param2 optional parameter
param: mixed $param3 optional parameter
return: string compiled code

getPlugin($plugin_name, $plugin_type)   X-Ref
Check for plugins and return function name

param: string $pugin_name  name of plugin or function
param: string $plugin_type type of plugin
return: string call name of function

getPluginFromDefaultHandler($tag, $plugin_type)   X-Ref
Check for plugins by default plugin handler

param: string $tag         name of tag
param: string $plugin_type type of plugin
return: boolean true if found

processNocacheCode($content, $is_code)   X-Ref
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.

param: string  $content content of template element
param: boolean $is_code true if content is compiled code
return: string content

trigger_template_error($args = null, $line = null)   X-Ref
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

param: string $args individual error message or null
param: string $line line-number



Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1