base
abstract class base implements template
Properties
protected context | $context | Template context. |
|
protected array | $filenames | Array of filenames assigned to set_filenames |
Methods
Sets the template filenames for handles.
Get a filename from the handle
Reset/empty complete block
Assign key variable pairs from an array
Assign a single scalar value to a single key.
Append text to the string value stored in a key.
Retrieve multiple template values
Retrieve a single scalar value from a single key.
Assign key variable pairs from an array to a specified block
Assign key variable pairs from an array to a whole specified block loop
Retrieve variable values from an specified block
Change already assigned key variable pair (one-dimensional - single loop entry)
Find the index for a specified key in the innermost specified block
Calls hook if any is defined.
Details
at line 36
template
set_filenames(array $filename_array)
Sets the template filenames for handles.
at line 49
protected string
get_filename_from_handle(string $handle)
Get a filename from the handle
at line 57
template
destroy()
Clears all variables and blocks assigned to this template.
at line 67
template
destroy_block_vars(string $blockname)
Reset/empty complete block
at line 77
template
assign_vars(array $vararray)
Assign key variable pairs from an array
at line 90
template
assign_var(string $varname, string $varval)
Assign a single scalar value to a single key.
Value can be a string, an integer or a boolean.
at line 100
template
append_var(string $varname, string $varval)
Append text to the string value stored in a key.
Text is appended using the string concatenation operator (.).
at line 110
array
retrieve_vars(array $vararray)
Retrieve multiple template values
at line 123
mixed
retrieve_var(string $varname)
Retrieve a single scalar value from a single key.
at line 131
template
assign_block_vars(string $blockname, array $vararray)
Assign key variable pairs from an array to a specified block
at line 141
template
assign_block_vars_array(string $blockname, array $block_vars_array)
Assign key variable pairs from an array to a whole specified block loop
at line 151
array
retrieve_block_vars(string $blockname, array $vararray)
Retrieve variable values from an specified block
at line 159
bool
alter_block_array(string $blockname, array $vararray, mixed $key = false, string $mode = 'insert')
Change already assigned key variable pair (one-dimensional - single loop entry)
An example of how to use this function: {@example alter_block_array.php}
at line 167
mixed
find_key_index(string $blockname, mixed $key)
Find the index for a specified key in the innermost specified block
at line 178
protected
call_hook(string $handle, string $method)
Calls hook if any is defined.