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
|
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
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
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
|
public
Smarty_Internal_Templatebase
|
#
unregisterPlugin( string $type, string $tag )
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
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
|
public
object
|
#
getRegisteredObject( string $name )
return a reference to a registered object
return a reference to a registered object
Parameters
Returns
object
Throws
|
public
Smarty_Internal_Templatebase
|
#
unregisterObject( string $name )
unregister an object
Parameters
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
|
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
|
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
|
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
|
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
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
|
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
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
|