Properties

$tpl_path

$tpl_path : string

Type

string

$tpl

$tpl : boolean|string

Type

boolean|string

$tpl_raw

$tpl_raw : boolean|string

Type

boolean|string

$tpl_name

$tpl_name : string

Type

string

$tpl_replaced

$tpl_replaced : array

Type

array

$tpl_vars_content

$tpl_vars_content : array

Type

array

$var_format_regex

$var_format_regex : string

Type

string

$var_format_regex_all

$var_format_regex_all : string

Type

string

Methods

__construct()

__construct(string  $template = "") 

Constructor

template constructor.

Parameters

string $template

get_tpl_name()

get_tpl_name() : string

Get template name

Return the template name.

Returns

string —

Returns the template name.

assign()

assign(  $needle,   $replace, boolean  $attach_before = false, boolean  $optional = false) : boolean

Assign template variables

Replace template variables with the placeholders.

Parameters

$needle

Placeholder set in template.

$replace

Variable to replace placeholder.

boolean $attach_before
boolean $optional

Returns

boolean

clear()

clear(  $needle) 

Clear

Clear template placeholder.

Parameters

$needle

var_exists()

var_exists(  $var) : boolean

Variable exists

Check if a placeholder exists in template.

Parameters

$var

Returns

boolean

display()

display(boolean  $return = false) : boolean|mixed|string

Display

Outputs or retuns template. Delete all unassigned placeholders. Optional: assigned global template variables.

Parameters

boolean $return

Output or retun template.

Returns

boolean|mixed|string

get_analytics_code()

get_analytics_code() : mixed

Get analytics code

Fetch analytics code from database.

Returns

mixed

parse_template()

parse_template(  $tpl) 

Parse template

Template parsen, falls Styleblöcke vorhanden

Parameters

$tpl

var_format_check()

var_format_check(  $input) : false|integer

Variable format check

Check if a variable matches a pattern.

Parameters

$input

Returns

false|integer

check_unassigned_vars()

check_unassigned_vars() : boolean

Check unassigned variables

Check if template has unassigned placeholders.

Returns

boolean

assign_global_vars()

assign_global_vars() 

Assign global variables

Assign global variables in template (pagetitle_global, tpl_name, etc)