Extends the Smarty class for content.

package CMS
since 0.1

 Methods

Constructor

__construct() 

clearCache method NOTE: Overwrites parent

clearCache(mixed $template_name, int $cache_id = null, int $compile_id = null, mixed $exp_time = null, mixed $type = null) : mixed

Parameters

$template_name

mixed

$cache_id

int

$compile_id

int

$exp_time

mixed

$type

mixed

Returns

mixed

createTemplate()

createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true

Parameters

$template

$cache_id

$compile_id

$parent

$do_clone

defaultPluginHandler NOTE: Registered in constructor

defaultPluginHandler(string $name, string $type, string $template, string $callback, string $script, $cachable) : boolean

Parameters

$name

string

$type

string

$template

string

$callback

string

$script

string

$cachable

Returns

booleantrue on success, false on failure

Error console

errorConsole(\Exception $e) : \html
author Stikki

Parameters

$e

Returns

\html

fetch method NOTE: Overwrites parent

fetch(mixed $template = null, int $cache_id = null, $compile_id = null, mixed $parent = null, boolean $display = false, boolean $merge_tpl_vars = true, boolean $no_output_filter = false) : mixed

Parameters

$template

mixed

$cache_id

int

$compile_id

$parent

mixed

$display

boolean

$merge_tpl_vars

boolean

$no_output_filter

boolean

Returns

mixed

get_instance method

get_instance() : object
Static

Returns

object$this

isCached method NOTE: Overwrites parent

isCached($template = null, int $cache_id = null, int $compile_id = null, mixed $parent = null) : mixed

Parameters

$template

$cache_id

int

$compile_id

int

$parent

mixed

Returns

mixed

Test if a smarty plugin with the specified name already exists.

is_registered($name) : boolean

Parameters

$name

Returns

boolean

Takes unknown classes and loads plugin files for them class name format: Smarty_PluginType_PluginName plugin filename format: plugintype.pluginname.php

loadPlugin(string $plugin_name, bool $check = true) : string
Note: this method overrides the one in the smarty base class and provides more testing.

Parameters

$plugin_name

string

class plugin name to load

$check

bool

check if already loaded

Returns

string|boolean filepath of loaded file or false

Registers plugin to be used in templates

registerPlugin(string $type, string $tag, callback $callback, boolean $cacheable = true, array $cache_attr = null) : \Smarty_Internal_Templatebase

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

Exceptions

\SmartyException when the plugin tag is invalid

Returns

\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining

get_instance method

set_global_cacheid(int $id) : void

Parameters

$id

int

Load filters from CMSMS plugins folder

autoloadFilters() : void

 Properties

 

$id

$id 

Default

 

$params

$params 

Default

 

$_global_cache_id

$_global_cache_id 

Default

 

$_instance

$_instance 

Default

Static