Class for register/unregister methods

 Methods

__construct()

__construct($smarty) 

Parameters

$smarty

Registers static classes to be used in templates

registerClass($class_name, string $class_impl) 

Parameters

$class_name

$class_impl

string

the referenced PHP class to register

Registers a default plugin handler

registerDefaultPluginHandler($callback) 

Parameters

$callback

mixed string | array $plugin class/methode name

Registers a default template handler

registerDefaultTemplateHandler($callback) 

Parameters

$callback

mixed string | array class/method name

Registers object to be used in templates

registerObject($object_name, $object_impl, $allowed, boolean $smarty_args, $block_methods) 

Parameters

$object_name

$object_impl

$allowed

$smarty_args

boolean

smarty argument format, else traditional

$block_methods

Registers plugin to be used in templates

registerPlugin(string $type, string $tag, callback $callback, boolean $cacheable, array $cache_attr) 

Parameters

$type

string

plugin type

$tag

string

name of template tag

$callback

callback

PHP callback to register

$cacheable

boolean

if true (default) this fuction is cachable

$cache_attr

array

caching attributes if any

Registers a resource to fetch a template

registerResource(string $type, array $callback) 

Parameters

$type

string

name of resource type

$callback

array

array of callbacks to handle resource

Unregister Plugin

unregisterPlugin(string $type, string $tag) 

Parameters

$type

string

of plugin

$tag

string

name of plugin

Unregisters a resource

unregisterResource(string $type) 

Parameters

$type

string

name of resource type