PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Data Fields
Smarty_Internal_Template Class Reference
Inheritance diagram for Smarty_Internal_Template:
Smarty_Internal_TemplateBase Smarty_Internal_Data

Public Member Functions

 __construct ($template_resource, $smarty, $_parent=null, $_cache_id=null, $_compile_id=null, $_caching=null, $_cache_lifetime=null)
 Create template data object. More...
 
 mustCompile ()
 Returns if the current template must be compiled by the Smarty compiler. More...
 
 compileTemplateSource ()
 Compiles the template. More...
 
 writeCachedContent ($content)
 Writes the cached template output. More...
 
 getSubTemplate ($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)
 Template code runtime function to get subtemplate content. More...
 
 setupInlineSubTemplate ($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $hash)
 Template code runtime function to set up an inline subtemplate. More...
 
 createTemplateCodeFrame ($content= '', $cache=false)
 Create code frame for compiled and cached templates. More...
 
 decodeProperties ($properties, $cache=false)
 This function is executed automatically when a compiled or cached template file is included. More...
 
 createLocalArrayVariable ($tpl_var, $nocache=false, $scope=Smarty::SCOPE_LOCAL)
 Template code runtime function to create a local Smarty variable for array assignments. More...
 
getScope ($scope)
 Template code runtime function to get pointer to template variable array of requested scope. More...
 
 getScopePointer ($scope)
 Get parent or root of template parent chain. More...
 
 _count ($value)
 [util function] counts an array, arrayaccess/traversable or PDOStatement object More...
 
 capture_error ()
 runtime error not matching capture tags More...
 
 clearCache ($exp_time=null)
 Empty cache for this template. More...
 
 __set ($property_name, $value)
 set Smarty property in template context More...
 
 __get ($property_name)
 get Smarty property in template context More...
 
 __destruct ()
 Template data object destrutor. More...
 
- Public Member Functions inherited from Smarty_Internal_TemplateBase
 fetch ($template=null, $cache_id=null, $compile_id=null, $parent=null, $display=false, $merge_tpl_vars=true, $no_output_filter=false)
 fetches a rendered Smarty template More...
 
 display ($template=null, $cache_id=null, $compile_id=null, $parent=null)
 displays a Smarty template More...
 
 isCached ($template=null, $cache_id=null, $compile_id=null, $parent=null)
 test if cache is valid More...
 
 createData ($parent=null)
 creates a data object More...
 
 registerPlugin ($type, $tag, $callback, $cacheable=true, $cache_attr=null)
 Registers plugin to be used in templates. More...
 
 unregisterPlugin ($type, $tag)
 Unregister Plugin. More...
 
 registerResource ($type, $callback)
 Registers a resource to fetch a template. More...
 
 unregisterResource ($type)
 Unregisters a resource. More...
 
 registerCacheResource ($type, Smarty_CacheResource $callback)
 Registers a cache resource to cache a template's output. More...
 
 unregisterCacheResource ($type)
 Unregisters a cache resource. More...
 
 registerObject ($object_name, $object_impl, $allowed=array(), $smarty_args=true, $block_methods=array())
 Registers object to be used in templates. More...
 
 getRegisteredObject ($name)
 return a reference to a registered object More...
 
 unregisterObject ($name)
 unregister an object More...
 
 registerClass ($class_name, $class_impl)
 Registers static classes to be used in templates. More...
 
 registerDefaultPluginHandler ($callback)
 Registers a default plugin handler. More...
 
 registerDefaultTemplateHandler ($callback)
 Registers a default template handler. More...
 
 registerDefaultConfigHandler ($callback)
 Registers a default template handler. More...
 
 registerFilter ($type, $callback)
 Registers a filter function. More...
 
 unregisterFilter ($type, $callback)
 Unregisters a filter function. More...
 
 _get_filter_name ($function_name)
 Return internal filter name. More...
 
 loadFilter ($type, $name)
 load a filter of specified type and name More...
 
 unloadFilter ($type, $name)
 unload a filter of specified type and name More...
 
 __call ($name, $args)
 Handle unknown class methods. More...
 
- Public Member Functions inherited from Smarty_Internal_Data
 assign ($tpl_var, $value=null, $nocache=false)
 assigns a Smarty variable More...
 
 assignGlobal ($varname, $value=null, $nocache=false)
 assigns a global Smarty variable More...
 
 assignByRef ($tpl_var, &$value, $nocache=false)
 assigns values to template variables by reference More...
 
 append ($tpl_var, $value=null, $merge=false, $nocache=false)
 appends values to template variables More...
 
 appendByRef ($tpl_var, &$value, $merge=false)
 appends values to template variables by reference More...
 
 getTemplateVars ($varname=null, $_ptr=null, $search_parents=true)
 Returns a single or all template variables. More...
 
 clearAssign ($tpl_var)
 clear the given assigned template variable. More...
 
 clearAllAssign ()
 clear all the assigned template variables. More...
 
 configLoad ($config_file, $sections=null)
 load a config file, optionally load just selected sections More...
 
 getVariable ($variable, $_ptr=null, $search_parents=true, $error_enable=true)
 gets the object of a Smarty variable More...
 
 getConfigVariable ($variable, $error_enable=true)
 gets a config variable More...
 
 getStreamVariable ($variable)
 gets a stream variable More...
 
 getConfigVars ($varname=null, $search_parents=true)
 Returns a single or all config variables. More...
 
 clearConfig ($varname=null)
 Deassigns a single or all config variables. More...
 

Data Fields

 $cache_id = null
 
 $compile_id = null
 
 $caching = null
 
 $cache_lifetime = null
 
 $template_resource = null
 
 $mustCompile = null
 
 $has_nocache_code = false
 
 $properties
 
 $required_plugins = array('compiled' => array(), 'nocache' => array())
 
 $smarty = null
 
 $block_data = array()
 
 $variable_filters = array()
 
 $used_tags = array()
 
 $allow_relative_path = false
 
 $_capture_stack = array(0 => array())
 
- Data Fields inherited from Smarty_Internal_Data
 $template_class = 'Smarty_Internal_Template'
 
 $tpl_vars = array()
 
 $parent = null
 
 $config_vars = array()
 

Detailed Description

Definition at line 22 of file smarty_internal_template.php.

Constructor & Destructor Documentation

__construct (   $template_resource,
  $smarty,
  $_parent = null,
  $_cache_id = null,
  $_compile_id = null,
  $_caching = null,
  $_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

Parameters
string$template_resourcetemplate resource string
Smarty$smartySmarty instance
Smarty_Internal_Template$_parentback pointer to parent object with variables or null
mixed$_cache_idcache id or null
mixed$_compile_idcompile id or null
bool$_cachinguse caching?
int$_cache_lifetimecache life-time in seconds

Definition at line 116 of file smarty_internal_template.php.

__destruct ( )

Template data object destrutor.

Definition at line 688 of file smarty_internal_template.php.

Member Function Documentation

__get (   $property_name)

get Smarty property in template context

Parameters
string$property_nameproperty name

Definition at line 634 of file smarty_internal_template.php.

__set (   $property_name,
  $value 
)

set Smarty property in template context

Parameters
string$property_nameproperty name
mixed$valuevalue

Definition at line 608 of file smarty_internal_template.php.

_count (   $value)

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

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

Definition at line 557 of file smarty_internal_template.php.

capture_error ( )

runtime error not matching capture tags

Definition at line 585 of file smarty_internal_template.php.

clearCache (   $exp_time = null)

Empty cache for this template.

Parameters
integer$exp_timeexpiration time
Returns
integer number of cache files deleted

Definition at line 596 of file smarty_internal_template.php.

compileTemplateSource ( )

Compiles the template.

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

Definition at line 164 of file smarty_internal_template.php.

createLocalArrayVariable (   $tpl_var,
  $nocache = false,
  $scope = Smarty::SCOPE_LOCAL 
)

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

Parameters
string$tpl_vartempate variable name
bool$nocachecache mode of variable
int$scopescope of variable

Definition at line 493 of file smarty_internal_template.php.

createTemplateCodeFrame (   $content = '',
  $cache = false 
)

Create code frame for compiled and cached templates.

Parameters
string$contentoptional template content
bool$cacheflag for cache file
Returns
string

Definition at line 337 of file smarty_internal_template.php.

decodeProperties (   $properties,
  $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
Parameters
array$propertiesspecial template properties
bool$cacheflag if called from cache file
Returns
bool flag if compiled or cache file is valid

Definition at line 427 of file smarty_internal_template.php.

& getScope (   $scope)

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

Parameters
int$scoperequested variable scope
Returns
array array of template variables

Definition at line 514 of file smarty_internal_template.php.

getScopePointer (   $scope)

Get parent or root of template parent chain.

Parameters
int$scopepqrent or root scope
Returns
mixed object

Definition at line 537 of file smarty_internal_template.php.

getSubTemplate (   $template,
  $cache_id,
  $compile_id,
  $caching,
  $cache_lifetime,
  $data,
  $parent_scope 
)

Template code runtime function to get subtemplate content.

Parameters
string$templatethe resource handle of the template file
mixed$cache_idcache id to be used with this template
mixed$compile_idcompile id to be used with this template
integer$cachingcache mode
integer$cache_lifetimelife time of cache data
array$varsoptional variables to assign
int$parent_scopescope in which {include} should execute
Returns
string template content

Definition at line 245 of file smarty_internal_template.php.

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
boolean true if the template must be compiled

Definition at line 142 of file smarty_internal_template.php.

setupInlineSubTemplate (   $template,
  $cache_id,
  $compile_id,
  $caching,
  $cache_lifetime,
  $data,
  $parent_scope,
  $hash 
)

Template code runtime function to set up an inline subtemplate.

Parameters
string$templatethe resource handle of the template file
mixed$cache_idcache id to be used with this template
mixed$compile_idcompile id to be used with this template
integer$cachingcache mode
integer$cache_lifetimelife time of cache data
array$varsoptional variables to assign
int$parent_scopescope in which {include} should execute
string$hashnocache hash code
Returns
string template content

Definition at line 302 of file smarty_internal_template.php.

writeCachedContent (   $content)

Writes the cached template output.

Returns
bool

Definition at line 217 of file smarty_internal_template.php.

Field Documentation

$_capture_stack = array(0 => array())

Definition at line 100 of file smarty_internal_template.php.

$allow_relative_path = false

Definition at line 95 of file smarty_internal_template.php.

$block_data = array()

Definition at line 80 of file smarty_internal_template.php.

$cache_id = null

Definition at line 28 of file smarty_internal_template.php.

$cache_lifetime = null

Definition at line 43 of file smarty_internal_template.php.

$caching = null

Definition at line 38 of file smarty_internal_template.php.

$compile_id = null

Definition at line 33 of file smarty_internal_template.php.

$has_nocache_code = false

Definition at line 58 of file smarty_internal_template.php.

$mustCompile = null

Definition at line 53 of file smarty_internal_template.php.

$properties
Initial value:
= array('file_dependency' => array(),
'nocache_hash' => '',
'function' => array())

Definition at line 63 of file smarty_internal_template.php.

$required_plugins = array('compiled' => array(), 'nocache' => array())

Definition at line 70 of file smarty_internal_template.php.

$smarty = null

Definition at line 75 of file smarty_internal_template.php.

$template_resource = null

Definition at line 48 of file smarty_internal_template.php.

$used_tags = array()

Definition at line 90 of file smarty_internal_template.php.

$variable_filters = array()

Definition at line 85 of file smarty_internal_template.php.


The documentation for this class was generated from the following file:

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:44 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.