Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Smarty_Internal_Compile_Append
  • Smarty_Internal_Compile_Assign
  • Smarty_Internal_Compile_Block
  • Smarty_Internal_Compile_Blockclose
  • Smarty_Internal_Compile_Break
  • Smarty_Internal_Compile_Call
  • Smarty_Internal_Compile_Capture
  • Smarty_Internal_Compile_CaptureClose
  • Smarty_Internal_Compile_Config_Load
  • Smarty_Internal_Compile_Continue
  • Smarty_Internal_Compile_Debug
  • Smarty_Internal_Compile_Else
  • Smarty_Internal_Compile_Elseif
  • Smarty_Internal_Compile_Eval
  • Smarty_Internal_Compile_Extends
  • Smarty_Internal_Compile_For
  • Smarty_Internal_Compile_Forclose
  • Smarty_Internal_Compile_Foreach
  • Smarty_Internal_Compile_Foreachclose
  • Smarty_Internal_Compile_Foreachelse
  • Smarty_Internal_Compile_Forelse
  • Smarty_Internal_Compile_Function
  • Smarty_Internal_Compile_Functionclose
  • Smarty_Internal_Compile_If
  • Smarty_Internal_Compile_Ifclose
  • Smarty_Internal_Compile_Include
  • Smarty_Internal_Compile_Include_Php
  • Smarty_Internal_Compile_Insert
  • Smarty_Internal_Compile_Ldelim
  • Smarty_Internal_Compile_Nocache
  • Smarty_Internal_Compile_Nocacheclose
  • Smarty_Internal_Compile_Private_Block_Plugin
  • Smarty_Internal_Compile_Private_Child_Block
  • Smarty_Internal_Compile_Private_Child_Blockclose
  • Smarty_Internal_Compile_Private_Function_Plugin
  • Smarty_Internal_Compile_Private_Modifier
  • Smarty_Internal_Compile_Private_Object_Block_Function
  • Smarty_Internal_Compile_Private_Object_Function
  • Smarty_Internal_Compile_Private_Print_Expression
  • Smarty_Internal_Compile_Private_Registered_Block
  • Smarty_Internal_Compile_Private_Registered_Function
  • Smarty_Internal_Compile_Private_Special_Variable
  • Smarty_Internal_Compile_Rdelim
  • Smarty_Internal_Compile_Section
  • Smarty_Internal_Compile_Sectionclose
  • Smarty_Internal_Compile_Sectionelse
  • Smarty_Internal_Compile_Setfilter
  • Smarty_Internal_Compile_Setfilterclose
  • Smarty_Internal_Compile_While
  • Smarty_Internal_Compile_Whileclose
  • Smarty_Internal_CompileBase
  • Smarty_Internal_Nocache_Insert
  • Smarty_Internal_SmartyTemplateCompiler
  • Smarty_Internal_TemplateCompilerBase
  • Smarty_Internal_Templatelexer
  • TP_yyToken
  • TPC_yyToken
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class Smarty_Internal_TemplateCompilerBase

Main abstract compiler class

Direct known subclasses

Smarty_Internal_SmartyTemplateCompiler
Abstract
Package: Smarty\Compiler
Author: Uwe Tews
Located at plugins/smarty/smarty_source/sysplugins/smarty_internal_templatecompilerbase.php
Methods summary
abstract protected boolean
# doCompile( mixed $_content )

method to compile a Smarty template

method to compile a Smarty template

Parameters

$_content
template source

Returns

boolean
true if compiling succeeded, false if it failed
public
# __construct( )

Initialize compiler

Initialize compiler

public boolean
# compileTemplate( Smarty_Internal_Template $template, boolean $nocache = false )

Method to compile a Smarty template

Method to compile a Smarty template

Parameters

$template
template object to compile
$nocache
true is shall be compiled in nocache mode

Returns

boolean
true if compiling succeeded, false if it failed
public string
# compileTag( string $tag, array $args, array $parameter = array() )

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

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

Parameters

$tag
tag name
$args
array with tag attributes
$parameter
array with compilation parameter

Returns

string
compiled code

Throws

SmartyCompilerException
SmartyException
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

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

Parameters

$tag
tag name
$args
list of tag attributes
$param1
optional parameter
$param2
optional parameter
$param3
optional parameter

Returns

string
compiled code
public string
# getPlugin( $plugin_name, string $plugin_type )

Check for plugins and return function name

Check for plugins and return function name

Parameters

$plugin_name
$plugin_type
type of plugin

Returns

string
call name of function
public boolean
# getPluginFromDefaultHandler( string $tag, string $plugin_type )

Check for plugins by default plugin handler

Check for plugins by default plugin handler

Parameters

$tag
name of tag
$plugin_type
type of plugin

Returns

boolean
true if found
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.

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.

Parameters

$content
content of template element
$is_code
true if content is compiled code

Returns

string
content
public
# pushTrace( string $file, string $uid, integer $line, boolean $debug = true )

push current file and line offset on stack for tracing {block} source lines

push current file and line offset on stack for tracing {block} source lines

Parameters

$file
new filename
$uid
uid of file
$line
line offset to source
$debug
false debug end_compile shall not be called
public
# popTrace( )

restore file and line offset

restore file and line offset

public
# trigger_template_error( string $args = null, string $line = 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

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

Parameters

$args
individual error message or null
$line
line-number

Throws

SmartyCompilerException
when an unexpected token is found
Properties summary
private mixed $nocache_hash

hash for nocache sections

hash for nocache sections

# null
public boolean $suppressNocacheProcessing

suppress generation of nocache code

suppress generation of nocache code

# false
public boolean $suppressMergedTemplates

suppress generation of merged template code

suppress generation of merged template code

# false
public static array $_tag_objects

compile tag objects

compile tag objects

# array()
public array $_tag_stack

tag stack

tag stack

# array()
public Smarty_Internal_Template $template

current template

current template

# null
public array $merged_templates

merged templates

merged templates

# array()
public array $sources

sources which must be compiled

sources which must be compiled

# array()
public boolean $inheritance

flag that we are inside {block}

flag that we are inside {block}

# false
public boolean $inheritance_child

flag when compiling inheritance child template

flag when compiling inheritance child template

# false
public array $extends_uid

uid of templates called by {extends} for recursion check

uid of templates called by {extends} for recursion check

# array()
public integer $trace_line_offset

source line offset for error messages

source line offset for error messages

# 0
public string $trace_uid

trace uid

trace uid

# ''
public string $trace_filepath

trace file path

trace file path

# ''
public array $trace_stack

stack for tracing file and line of nested {block} tags

stack for tracing file and line of nested {block} tags

# array()
public array $default_handler_plugins

plugins loaded by default plugin handler

plugins loaded by default plugin handler

# array()
public mixed $default_modifier_list

saved preprocessed modifier list

saved preprocessed modifier list

# null
public boolean $forceNocache

force compilation of complete template as nocache

force compilation of complete template as nocache

# false
public boolean $suppressHeader

suppress Smarty header code in compiled template

suppress Smarty header code in compiled template

# false
public boolean $suppressTemplatePropertyHeader

suppress template property header code in compiled template

suppress template property header code in compiled template

# false
public boolean $suppressFilter

suppress pre and post filter

suppress pre and post filter

# false
public boolean $write_compiled_code

flag if compiled template file shall we written

flag if compiled template file shall we written

# true
public boolean $compiles_template_function

flag if currently a template function is compiled

flag if currently a template function is compiled

# false
public array $called_functions

called subfuntions from template function

called subfuntions from template function

# array()
public array $modifier_plugins

flags for used modifier plugins

flags for used modifier plugins

# array()
public array $known_modifier_type

type of already compiled modifier

type of already compiled modifier

# array()
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen