phpBB

Code Changes

File: phpbb/template/template.php

  Unmodified   Added   Modified   Removed
Line 126Line 126
	* @return \phpbb\template\template $this
*/
public function append_var($varname, $varval);

	* @return \phpbb\template\template $this
*/
public function append_var($varname, $varval);

 

/**
* Retrieve multiple template values
*
* @param array $vararray An array with variable names
* @return array A hash of variable name => value pairs (value is null if not set)
*/
public function retrieve_vars(array $vararray);

/**
* Retreive a single scalar value from a single key.
*
* @param string $varname Variable name
* @return mixed Variable value, or null if not set
*/
public function retrieve_var($varname);


/**
* Assign key variable pairs from an array to a specified block


/**
* Assign key variable pairs from an array to a specified block

Line 142Line 158
	* @return \phpbb\template\template $this
*/
public function assign_block_vars_array($blockname, array $block_vars_array);

	* @return \phpbb\template\template $this
*/
public function assign_block_vars_array($blockname, array $block_vars_array);

 

/**
* Retrieve variable values from an specified block
* @param string $blockname Name of block to retrieve $vararray from
* @param array $vararray An array with variable names, empty array gets all vars
* @return array A hash of variable name => value pairs (value is null if not set)
*/
public function retrieve_block_vars($blockname, array $vararray);


/**
* Change already assigned key variable pair (one-dimensional - single loop entry)


/**
* Change already assigned key variable pair (one-dimensional - single loop entry)

Line 160Line 184
	* If key is false the position is set to 0
* If key is true the position is set to the last entry
*

	* If key is false the position is set to 0
* If key is true the position is set to the last entry
*

	* @param	string	$mode		Mode to execute (valid modes are 'insert' and 'change')

	* @param	string	$mode		Mode to execute (valid modes are 'insert', 'change' and 'delete')

	*
* If insert, the vararray is inserted at the given position (position counting from zero).
* If change, the current block gets merged with the vararray (resulting in new \key/value pairs be added and existing keys be replaced by the new \value).

	*
* If insert, the vararray is inserted at the given position (position counting from zero).
* If change, the current block gets merged with the vararray (resulting in new \key/value pairs be added and existing keys be replaced by the new \value).

 
	*	If delete, the vararray is ignored, and the block at the given position (counting from zero) is removed.

	*
* Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
* and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)

	*
* Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
* and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)

Line 171Line 196
	* @return bool false on error, true on success
*/
public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert');

	* @return bool false on error, true on success
*/
public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert');

 

/**
* Find the index for a specified key in the innermost specified block
*
* @param string $blockname the blockname, for example 'loop'
* @param mixed $key Key to search for
*
* array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
*
* int: Position [the position to search for]
*
* If key is false the position is set to 0
* If key is true the position is set to the last entry
*
* @return mixed false if not found, index position otherwise; be sure to test with ===
*/
public function find_key_index($blockname, $key);


/**
* Get path to template for handle (required for BBCode parser)


/**
* Get path to template for handle (required for BBCode parser)