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_Data
  • Smarty_Internal_Data
  • Smarty_Internal_Template
  • Smarty_Internal_TemplateBase
  • Smarty_Variable
  • Undefined_Smarty_Variable
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class Smarty_Internal_Template

Main class with template data structures and methods

Smarty_Internal_Data
Extended by Smarty_Internal_TemplateBase
Extended by Smarty_Internal_Template
Package: Smarty\Template
Author: Uwe Tews
Located at plugins/smarty/smarty_source/sysplugins/smarty_internal_template.php
Methods summary
public
# __construct( string $template_resource, Smarty $smarty, Smarty_Internal_Template $_parent = null, mixed $_cache_id = null, mixed $_compile_id = null, boolean $_caching = null, integer $_cache_lifetime = null )

Create template data object Some of the global Smarty settings copied to template scope It load the required template resources and cacher plugins

Create template data object Some of the global Smarty settings copied to template scope It load the required template resources and cacher plugins

Parameters

$template_resource
template resource string
$smarty
Smarty instance
$_parent
back pointer to parent object with variables or null
$_cache_id
cache id or null
$_compile_id
compile id or null
$_caching
use caching?
$_cache_lifetime
cache life-time in seconds
public boolean
# mustCompile( )

Returns if the current template must be compiled by the Smarty compiler It does compare the timestamps of template source and the compiled templates and checks the force compile configuration

Returns if the current template must be compiled by the Smarty compiler It does compare the timestamps of template source and the compiled templates and checks the force compile configuration

Returns

boolean
true if the template must be compiled

Throws

SmartyException
public
# compileTemplateSource( )

Compiles the template If the template is not evaluated the compiled template is saved on disk

Compiles the template If the template is not evaluated the compiled template is saved on disk

public boolean
# writeCachedContent( string $content )

Writes the cached template output

Writes the cached template output

Parameters

$content

Returns

boolean
public
# getSubTemplate( string $template, mixed $cache_id, mixed $compile_id, integer $caching, integer $cache_lifetime, $data, integer $parent_scope )

Template code runtime function to get subtemplate content

Template code runtime function to get subtemplate content

Parameters

$template
the resource handle of the template file
$cache_id
cache id to be used with this template
$compile_id
compile id to be used with this template
$caching
cache mode
$cache_lifetime
life time of cache data
$data
$parent_scope
scope in which {include} should execute

Returns

string template content
public
# setupInlineSubTemplate( string $template, mixed $cache_id, mixed $compile_id, integer $caching, integer $cache_lifetime, $data, integer $parent_scope, string $hash )

Template code runtime function to set up an inline subtemplate

Template code runtime function to set up an inline subtemplate

Parameters

$template
the resource handle of the template file
$cache_id
cache id to be used with this template
$compile_id
compile id to be used with this template
$caching
cache mode
$cache_lifetime
life time of cache data
$data
$parent_scope
scope in which {include} should execute
$hash
nocache hash code

Returns

string template content
public string
# createTemplateCodeFrame( string $content = '', boolean $cache = false )

Create code frame for compiled and cached templates

Create code frame for compiled and cached templates

Parameters

$content
optional template content
$cache
flag for cache file

Returns

string
public boolean
# decodeProperties( array $properties, boolean $cache = false )

This function is executed automatically when a compiled or cached template file is included - Decode saved properties from compiled template and cache files - Check if compiled or cache file is valid

This function is executed automatically when a compiled or cached template file is included - Decode saved properties from compiled template and cache files - Check if compiled or cache file is valid

Parameters

$properties
special template properties
$cache
flag if called from cache file

Returns

boolean
flag if compiled or cache file is valid
public
# createLocalArrayVariable( string $tpl_var, boolean $nocache = false, integer $scope = Smarty::SCOPE_LOCAL )

Template code runtime function to create a local Smarty variable for array assignments

Template code runtime function to create a local Smarty variable for array assignments

Parameters

$tpl_var
tempate variable name
$nocache
cache mode of variable
$scope
scope of variable
public array &
# getScope( integer $scope )

Template code runtime function to get pointer to template variable array of requested scope

Template code runtime function to get pointer to template variable array of requested scope

Parameters

$scope
requested variable scope

Returns

array
array of template variables
public mixed
# getScopePointer( integer $scope )

Get parent or root of template parent chain

Get parent or root of template parent chain

Parameters

$scope
pqrent or root scope

Returns

mixed
object
public integer
# _count( mixed $value )

[util function] counts an array, arrayaccess/traversable or PDOStatement object

[util function] counts an array, arrayaccess/traversable or PDOStatement object

Parameters

$value

Returns

integer
the count for arrays and objects that implement countable, 1 for other objects that don't, and 0 for empty elements
public
# capture_error( )

runtime error not matching capture tags

runtime error not matching capture tags

public integer
# clearCache( integer $exp_time = null )

Empty cache for this template

Empty cache for this template

Parameters

$exp_time
expiration time

Returns

integer
number of cache files deleted
public
# __set( string $property_name, mixed $value )

set Smarty property in template context

set Smarty property in template context

Parameters

$property_name
property name
$value
value

Throws

SmartyException
public
# __get( string $property_name )

get Smarty property in template context

get Smarty property in template context

Parameters

$property_name
property name

Throws

SmartyException
public
# __destruct( )

Template data object destructor

Template data object destructor

Methods inherited from Smarty_Internal_TemplateBase
__call(), _get_filter_name(), createData(), display(), fetch(), getRegisteredObject(), isCached(), loadFilter(), registerCacheResource(), registerClass(), registerDefaultConfigHandler(), registerDefaultPluginHandler(), registerDefaultTemplateHandler(), registerFilter(), registerObject(), registerPlugin(), registerResource(), unloadFilter(), unregisterCacheResource(), unregisterFilter(), unregisterObject(), unregisterPlugin(), unregisterResource()
Methods inherited from Smarty_Internal_Data
append(), appendByRef(), assign(), assignByRef(), assignGlobal(), clearAllAssign(), clearAssign(), clearConfig(), configLoad(), getConfigVariable(), getConfigVars(), getStreamVariable(), getTemplateVars(), getVariable()
Properties summary
public string $cache_id

cache_id

cache_id

# null
public string $compile_id

$compile_id

$compile_id

# null
public boolean $caching

caching enabled

caching enabled

# null
public integer $cache_lifetime

cache lifetime in seconds

cache lifetime in seconds

# null
public string $template_resource

Template resource

Template resource

# null
public boolean $mustCompile

flag if compiled template is invalid and must be (re)compiled

flag if compiled template is invalid and must be (re)compiled

# null
public boolean $has_nocache_code

flag if template does contain nocache code sections

flag if template does contain nocache code sections

# false
public array $properties

special compiled and cached template properties

special compiled and cached template properties

# array('file_dependency' => array(), 'nocache_hash' => '', 'function' => array())
public array $required_plugins

required plugins

required plugins

# array('compiled' => array(), 'nocache' => array())
public Smarty $smarty

Global smarty instance

Global smarty instance

# null
public array $block_data

blocks for template inheritance

blocks for template inheritance

# array()
public array $variable_filters

variable filters

variable filters

# array()
public array $used_tags

optional log of tag/attributes

optional log of tag/attributes

# array()
public boolean $allow_relative_path

internal flag to allow relative path in child template blocks

internal flag to allow relative path in child template blocks

# false
public array $_capture_stack

internal capture runtime stack

internal capture runtime stack

# array(0 => array())
Properties inherited from Smarty_Internal_Data
$config_vars, $parent, $template_class, $tpl_vars
Magic properties summary
public Smarty_Template_Source $source
public Smarty_Template_Compiled $compiled
public Smarty_Template_Cached $cached
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen