[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

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

Smarty Internal Plugin Template This file contains the Smarty template engine

Author: Uwe Tews
File Size: 684 lines (28 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 libraries/Smarty/libs/sysplugins/smarty_cacheresource.php

Defines 1 class

Smarty_Internal_Template:: (17 methods):
  __construct()
  mustCompile()
  compileTemplateSource()
  writeCachedContent()
  getSubTemplate()
  setupInlineSubTemplate()
  createTemplateCodeFrame()
  decodeProperties()
  createLocalArrayVariable()
  getScope()
  getScopePointer()
  _count()
  capture_error()
  clearCache()
  __set()
  __get()
  __destruct()


Class: Smarty_Internal_Template  - X-Ref

Main class with template data structures and methods

__construct($template_resource, $smarty, $_parent = null, $_cache_id = null, $_compile_id = null, $_caching = null, $_cache_lifetime = null)   X-Ref
Create template data object

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

param: string                   $template_resource template resource string
param: Smarty                   $smarty            Smarty instance
param: Smarty_Internal_Template $_parent           back pointer to parent object with variables or null
param: mixed                    $_cache_id cache   id or null
param: mixed                    $_compile_id       compile id or null
param: bool                     $_caching          use caching?
param: int                      $_cache_lifetime   cache life-time in seconds

mustCompile()   X-Ref
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

return: boolean true if the template must be compiled

compileTemplateSource()   X-Ref
Compiles the template

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

writeCachedContent($content)   X-Ref
Writes the cached template output

return: bool

getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)   X-Ref
Template code runtime function to get subtemplate content

returns: string template content
param: string  $template       the resource handle of the template file
param: mixed   $cache_id       cache id to be used with this template
param: mixed   $compile_id     compile id to be used with this template
param: integer $caching        cache mode
param: integer $cache_lifetime life time of cache data
param: array   $vars optional  variables to assign
param: int     $parent_scope   scope in which {include} should execute

setupInlineSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $hash)   X-Ref
Template code runtime function to set up an inline subtemplate

returns: string template content
param: string  $template       the resource handle of the template file
param: mixed   $cache_id       cache id to be used with this template
param: mixed   $compile_id     compile id to be used with this template
param: integer $caching        cache mode
param: integer $cache_lifetime life time of cache data
param: array   $vars optional  variables to assign
param: int     $parent_scope   scope in which {include} should execute
param: string  $hash           nocache hash code

createTemplateCodeFrame($content = '', $cache = false)   X-Ref
Create code frame for compiled and cached templates

param: string $content   optional template content
param: bool   $cache     flag for cache file
return: string

decodeProperties($properties, $cache = false)   X-Ref
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

param: array $properties     special template properties
param: bool  $cache          flag if called from cache file
return: bool                 flag if compiled or cache file is valid

createLocalArrayVariable($tpl_var, $nocache = false, $scope = Smarty::SCOPE_LOCAL)   X-Ref
Template code runtime function to create a local Smarty variable for array assignments

param: string $tpl_var   tempate variable name
param: bool   $nocache   cache mode of variable
param: int    $scope     scope of variable

getScope($scope)   X-Ref
Template code runtime function to get pointer to template variable array of requested scope

param: int $scope    requested variable scope
return: array        array of template variables

getScopePointer($scope)   X-Ref
Get parent or root of template parent chain

param: int $scope    pqrent or root scope
return: mixed object

_count($value)   X-Ref
[util function] counts an array, arrayaccess/traversable or PDOStatement object

param: mixed $value
return: int the count for arrays and objects that implement countable, 1 for other objects that don't, and 0 for empty elements

capture_error()   X-Ref
runtime error not matching capture tags


clearCache($exp_time=null)   X-Ref
Empty cache for this template

param: integer $exp_time      expiration time
return: integer number of cache files deleted

__set($property_name, $value)   X-Ref
set Smarty property in template context

param: string $property_name property name
param: mixed  $value         value

__get($property_name)   X-Ref
get Smarty property in template context

param: string $property_name property name

__destruct()   X-Ref
Template data object destrutor




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