context
class context
Stores variables assigned to template.
Methods
No description
Clears template data set.
Assign a single scalar value to a single key.
Append text to the string value stored in a key.
Retrieve a single scalar value from a single key.
Returns a reference to template data array.
Set S_NUM_ROWS for each row in this template block
Returns a reference to template root scope.
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 key variable pairs from the specified block
Find the index for a specified key in the innermost specified block
Change already assigned key variable pair (one-dimensional - single loop entry)
Reset/empty complete block
Details
at line 42
__construct()
No description
at line 50
clear()
Clears template data set.
at line 66
true
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 82
true
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 95
mixed
retrieve_var(string $varname)
Retrieve a single scalar value from a single key.
at line 110
array
get_data_ref()
Returns a reference to template data array.
This function is public so that template renderer may invoke it. Users should alter template variables via functions in \phpbb\template\template.
Note: modifying returned array will affect data stored in the context.
at line 143
protected
set_num_rows(array $loop_data)
Set S_NUM_ROWS for each row in this template block
at line 177
array
get_root_ref()
Returns a reference to template root scope.
This function is public so that template renderer may invoke it. Users should not need to invoke this function.
Note: modifying returned array will affect data stored in the context.
at line 190
true
assign_block_vars(string $blockname, array $vararray)
Assign key variable pairs from an array to a specified block
at line 248
true
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 265
array
retrieve_block_vars(string $blockname, array $vararray)
Retrieve key variable pairs from the specified block
at line 345
mixed
find_key_index(string $blockname, mixed $key)
Find the index for a specified key in the innermost specified block
at line 430
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 608
true
destroy_block_vars(string $blockname)
Reset/empty complete block