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_TemplateBase

Class with shared template methods

Smarty_Internal_Data
Extended by Smarty_Internal_TemplateBase

Direct known subclasses

Smarty, Smarty_Internal_Template

Indirect known subclasses

cSmartyWrapper, SmartyBC
Abstract
Package: Smarty\Template
Author: Uwe Tews
Located at plugins/smarty/smarty_source/sysplugins/smarty_internal_templatebase.php
Methods summary
public string
# fetch( string $template = null, mixed $cache_id = null, mixed $compile_id = null, object $parent = null, boolean $display = false, boolean $merge_tpl_vars = true, boolean $no_output_filter = false )

fetches a rendered Smarty template

fetches a rendered Smarty template

Parameters

$template
the resource handle of the template file or template object
$cache_id
cache id to be used with this template
$compile_id
compile id to be used with this template
$parent
next higher level of Smarty variables
$display
true: display, false: fetch
$merge_tpl_vars
if true parent template variables merged in to local scope
$no_output_filter
if true do not run output filter

Returns

string
rendered template output

Throws

Exception
SmartyException
public
# display( string $template = null, mixed $cache_id = null, mixed $compile_id = null, object $parent = null )

displays a Smarty template

displays a Smarty template

Parameters

$template
the resource handle of the template file or template object
$cache_id
cache id to be used with this template
$compile_id
compile id to be used with this template
$parent
next higher level of Smarty variables
public boolean
# isCached( string|object $template = null, mixed $cache_id = null, mixed $compile_id = null, object $parent = null )

test if cache is valid

test if cache is valid

Parameters

$template
the resource handle of the template file or template object
$cache_id
cache id to be used with this template
$compile_id
compile id to be used with this template
$parent
next higher level of Smarty variables

Returns

boolean
cache status
public
# createData( object $parent = null )

creates a data object

creates a data object

Parameters

$parent
next higher level of Smarty variables

Returns

Smarty_Data data object
public Smarty_Internal_Templatebase
# registerPlugin( string $type, string $tag, callable $callback, boolean $cacheable = true, array $cache_attr = null )

Registers plugin to be used in templates

Registers plugin to be used in templates

Parameters

$type
plugin type
$tag
name of template tag
$callback
PHP callback to register
$cacheable
if true (default) this fuction is cachable
$cache_attr
caching attributes if any

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining

Throws

SmartyException
when the plugin tag is invalid
public Smarty_Internal_Templatebase
# unregisterPlugin( string $type, string $tag )

Unregister Plugin

Unregister Plugin

Parameters

$type
of plugin
$tag
name of plugin

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
public Smarty_Internal_Templatebase
# registerResource( string $type, Smarty_Resource|array $callback )

Registers a resource to fetch a template

Registers a resource to fetch a template

Parameters

$type
name of resource type
$callback
or instance of Smarty_Resource, or array of callbacks to handle resource (deprecated)

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
public Smarty_Internal_Templatebase
# unregisterResource( string $type )

Unregisters a resource

Unregisters a resource

Parameters

$type
name of resource type

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
public Smarty_Internal_Templatebase
# registerCacheResource( string $type, Smarty_CacheResource $callback )

Registers a cache resource to cache a template's output

Registers a cache resource to cache a template's output

Parameters

$type
name of cache resource type
$callback
instance of Smarty_CacheResource to handle output caching

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
public Smarty_Internal_Templatebase
# unregisterCacheResource( string $type )

Unregisters a cache resource

Unregisters a cache resource

Parameters

$type
name of cache resource type

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
public Smarty_Internal_Templatebase
# registerObject( $object_name, object $object_impl, array $allowed = array(), boolean $smarty_args = true, array $block_methods = array() )

Registers object to be used in templates

Registers object to be used in templates

Parameters

$object_name
$object_impl
the referenced PHP object to register
$allowed
list of allowed methods (empty = all)
$smarty_args
smarty argument format, else traditional
$block_methods
list of block-methods

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining

Throws

SmartyException
public object
# getRegisteredObject( string $name )

return a reference to a registered object

return a reference to a registered object

Parameters

$name
object name

Returns

object

Throws

SmartyException
if no such object is found
public Smarty_Internal_Templatebase
# unregisterObject( string $name )

unregister an object

unregister an object

Parameters

$name
object name

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
public Smarty_Internal_Templatebase
# registerClass( $class_name, string $class_impl )

Registers static classes to be used in templates

Registers static classes to be used in templates

Parameters

$class_name
$class_impl
the referenced PHP class to register

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining

Throws

SmartyException
public Smarty_Internal_Templatebase
# registerDefaultPluginHandler( callable $callback )

Registers a default plugin handler

Registers a default plugin handler

Parameters

$callback
class/method name

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining

Throws

SmartyException
if $callback is not callable
public Smarty_Internal_Templatebase
# registerDefaultTemplateHandler( callable $callback )

Registers a default template handler

Registers a default template handler

Parameters

$callback
class/method name

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining

Throws

SmartyException
if $callback is not callable
public Smarty_Internal_Templatebase
# registerDefaultConfigHandler( callable $callback )

Registers a default template handler

Registers a default template handler

Parameters

$callback
class/method name

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining

Throws

SmartyException
if $callback is not callable
public Smarty_Internal_Templatebase
# registerFilter( string $type, callable $callback )

Registers a filter function

Registers a filter function

Parameters

$type
filter type
$callback

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
public Smarty_Internal_Templatebase
# unregisterFilter( string $type, callable $callback )

Unregisters a filter function

Unregisters a filter function

Parameters

$type
filter type
$callback

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
public string
# _get_filter_name( callable $function_name )

Return internal filter name

Return internal filter name

Parameters

$function_name

Returns

string
internal filter name
public
# loadFilter( string $type, string $name )

load a filter of specified type and name

load a filter of specified type and name

Parameters

$type
filter type
$name
filter name

Throws

SmartyException
if filter could not be loaded
public Smarty_Internal_Templatebase
# unloadFilter( string $type, string $name )

unload a filter of specified type and name

unload a filter of specified type and name

Parameters

$type
filter type
$name
filter name

Returns

Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
private string
# replaceCamelcase( string $match )

preg_replace callback to convert camelcase getter/setter to underscore property names

preg_replace callback to convert camelcase getter/setter to underscore property names

Parameters

$match
match string

Returns

string
replacemant
public
# __call( string $name, array $args )

Handle unknown class methods

Handle unknown class methods

Parameters

$name
unknown method-name
$args
argument array

Throws

SmartyException
Methods inherited from Smarty_Internal_Data
append(), appendByRef(), assign(), assignByRef(), assignGlobal(), clearAllAssign(), clearAssign(), clearConfig(), configLoad(), getConfigVariable(), getConfigVars(), getStreamVariable(), getTemplateVars(), getVariable()
Properties inherited from Smarty_Internal_Data
$config_vars, $parent, $template_class, $tpl_vars
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen