Class Smarty_Internal_TemplateBase

Description

Class with shared template methodes

  • abstract:

Located in /libs/sysplugins/smarty_internal_templatebase.php (line 18)

Smarty_Internal_Data
   |
   --Smarty_Internal_TemplateBase
Direct descendents
Class Description
Smarty This is the main Smarty class
Smarty_Internal_Template Main class with template data structures and methods
Method Summary
Smarty_Data createData ([object $parent = null])
void display ([string $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null])
string fetch ([string $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null], [bool $display = false], [bool $merge_tpl_vars = true], [bool $no_output_filter = false])
object getRegisteredObject (string $name)
boolean isCached ([string|object  $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null])
bool loadFilter (string $type, string $name)
void registerCacheResource (string $type, Smarty_CacheResource $callback)
void registerClass ( $class_name, string $class_impl, string $class)
void registerDefaultConfigHandler (callable $callback)
void registerDefaultPluginHandler (callable $callback)
void registerDefaultTemplateHandler (callable $callback)
void registerFilter (string $type, callback $callback)
void registerObject ( $object_name, object $object_impl, [array $allowed = array()], [boolean $smarty_args = true], [array $block_methods = array()], string $object, array $block_functs)
void registerPlugin (string $type, string $tag, callback $callback, [boolean $cacheable = true], [array $cache_attr = null])
void registerResource (string $type, Smarty_Resource|array $callback)
void unregisterCacheResource (string $type)
void unregisterFilter (string $type, callback $callback)
void unregisterObject (string $name)
void unregisterPlugin (string $type, string $tag)
void unregisterResource (string $type)
void _get_filter_name (callback $function_name)
void __call (string $name, array $args)
Variables
Methods
createData (line 386)

creates a data object

  • return: data object
  • access: public
Smarty_Data createData ([object $parent = null])
  • object $parent: next higher level of Smarty variables
display (line 350)

displays a Smarty template

  • access: public
void display ([string $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null])
  • string $template: the resource handle of the template file or template object
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • object $parent: next higher level of Smarty variables
fetch (line 32)

fetches a rendered Smarty template

  • return: rendered template output
  • access: public
string fetch ([string $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null], [bool $display = false], [bool $merge_tpl_vars = true], [bool $no_output_filter = false])
  • string $template: the resource handle of the template file or template object
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • object $parent: next higher level of Smarty variables
  • bool $display: true: display, false: fetch
  • bool $merge_tpl_vars: if true parent template variables merged in to local scope
  • bool $no_output_filter: if true do not run output filter
getRegisteredObject (line 512)

return a reference to a registered object

  • throws: SmartyException if no such object is found
  • access: public
object getRegisteredObject (string $name)
  • string $name: object name
isCached (line 365)

test if cache is valid

  • return: cache status
  • access: public
boolean isCached ([string|object  $template = null], [mixed $cache_id = null], [mixed $compile_id = null], [object $parent = null])
  • string|object $template: the resource handle of the template file or template object
  • mixed $cache_id: cache id to be used with this template
  • mixed $compile_id: compile id to be used with this template
  • object $parent: next higher level of Smarty variables
loadFilter (line 645)

load a filter of specified type and name

  • access: public
bool loadFilter (string $type, string $name)
  • string $type: filter type
  • string $name: filter name
registerCacheResource (line 454)

Registers a cache resource to cache a template's output

  • access: public
void registerCacheResource (string $type, Smarty_CacheResource $callback)
  • string $type: name of cache resource type
  • Smarty_CacheResource $callback: instance of Smarty_CacheResource to handle output caching
registerClass (line 542)

Registers static classes to be used in templates

  • throws: SmartyException if $class_impl does not refer to an existing class
  • access: public
void registerClass ( $class_name, string $class_impl, string $class)
  • string $class: name of template class
  • string $class_impl: the referenced PHP class to register
  • $class_name
registerDefaultConfigHandler (line 588)

Registers a default template handler

  • throws: SmartyException if $callback is not callable
  • access: public
void registerDefaultConfigHandler (callable $callback)
  • callable $callback: class/method name
registerDefaultPluginHandler (line 558)

Registers a default plugin handler

  • throws: SmartyException if $callback is not callable
  • access: public
void registerDefaultPluginHandler (callable $callback)
  • callable $callback: class/method name
registerDefaultTemplateHandler (line 573)

Registers a default template handler

  • throws: SmartyException if $callback is not callable
  • access: public
void registerDefaultTemplateHandler (callable $callback)
  • callable $callback: class/method name
registerFilter (line 603)

Registers a filter function

  • access: public
void registerFilter (string $type, callback $callback)
  • string $type: filter type
  • callback $callback
registerObject (line 482)

Registers object to be used in templates

  • throws: SmartyException if any of the methods in $allowed or $block_methods are invalid
  • access: public
void registerObject ( $object_name, object $object_impl, [array $allowed = array()], [boolean $smarty_args = true], [array $block_methods = array()], string $object, array $block_functs)
  • string $object: name of template object
  • object $object_impl: the referenced PHP object to register
  • array $allowed: list of allowed methods (empty = all)
  • boolean $smarty_args: smarty argument format, else traditional
  • array $block_methods: list of block-methods
  • array $block_functs: list of methods that are block format
  • $object_name
registerPlugin (line 401)

Registers plugin to be used in templates

  • throws: SmartyException when the plugin tag is invalid
  • access: public
void registerPlugin (string $type, string $tag, callback $callback, [boolean $cacheable = true], [array $cache_attr = null])
  • string $type: plugin type
  • string $tag: name of template tag
  • callback $callback: PHP callback to register
  • boolean $cacheable: if true (default) this fuction is cachable
  • array $cache_attr: caching attributes if any
registerResource (line 431)

Registers a resource to fetch a template

  • access: public
void registerResource (string $type, Smarty_Resource|array $callback)
  • string $type: name of resource type
  • Smarty_Resource|array $callback: or instance of Smarty_Resource, or array of callbacks to handle resource (deprecated)
unregisterCacheResource (line 464)

Unregisters a cache resource

  • access: public
void unregisterCacheResource (string $type)
  • string $type: name of cache resource type
unregisterFilter (line 614)

Unregisters a filter function

  • access: public
void unregisterFilter (string $type, callback $callback)
  • string $type: filter type
  • callback $callback
unregisterObject (line 529)

unregister an object

  • throws: SmartyException if no such object is found
  • access: public
void unregisterObject (string $name)
  • string $name: object name
unregisterPlugin (line 418)

Unregister Plugin

  • access: public
void unregisterPlugin (string $type, string $tag)
  • string $type: of plugin
  • string $tag: name of plugin
unregisterResource (line 441)

Unregisters a resource

  • access: public
void unregisterResource (string $type)
  • string $type: name of resource type
_get_filter_name (line 627)

Return internal filter name

  • access: public
void _get_filter_name (callback $function_name)
  • callback $function_name
__call (line 677)

Handle unknown class methods

  • access: public
void __call (string $name, array $args)
  • string $name: unknown method-name
  • array $args: argument array

Inherited Methods

Inherited From Smarty_Internal_Data

Smarty_Internal_Data::append()
Smarty_Internal_Data::appendByRef()
Smarty_Internal_Data::assign()
Smarty_Internal_Data::assignByRef()
Smarty_Internal_Data::assignGlobal()
Smarty_Internal_Data::clearAllAssign()
Smarty_Internal_Data::clearAssign()
Smarty_Internal_Data::clearConfig()
Smarty_Internal_Data::configLoad()
Smarty_Internal_Data::getConfigVariable()
Smarty_Internal_Data::getConfigVars()
Smarty_Internal_Data::getStreamVariable()
Smarty_Internal_Data::getTemplateVars()
Smarty_Internal_Data::getVariable()

Documentation generated on Sat, 24 Sep 2011 20:24:01 +0200 by phpDocumentor 1.4.1