Function __global->ecv

Definitions

sources/symbols.php

  • Evaluate a conventional Tempcode construct, handling escaping.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$lang string No No required parameter N/A N/A The language to evaluate this symbol in (some symbols refer to language elements)
$escaped array No No required parameter N/A N/A Array of escaping operations
$type integer No No required parameter 0 2 N/A The type of symbol this is (TC_SYMBOL, TC_LANGUAGE_REFERENCE)
$name ID_TEXT No No required parameter N/A N/A The name of the symbol
$param array No No required parameter N/A N/A Parameters to the symbol. For all but directive it is an array of strings. For directives it is an array of Tempcode objects. Actually there may be template-style parameters in here, as an influence of singular_bind and these may be Tempcode, but we ignore them.
$template_name ID_TEXT No No Blank (empty string) N/A N/A The name of the template this came from (blank: not from a file / unknown); only passed for directives to avoid infinite loops with INCLUDE

Returns

  • The result. Either Tempcode, or a string.
  • Type: mixed
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Evaluate a conventional Tempcode construct, handling escaping.
 *
 * @param  string $lang The language to evaluate this symbol in (some symbols refer to language elements)
 * @param  array $escaped Array of escaping operations
 * @param  integer $type The type of symbol this is (TC_SYMBOL, TC_LANGUAGE_REFERENCE)
 * @set 0 2
 * @param  ID_TEXT $name The name of the symbol
 * @param  array $param Parameters to the symbol. For all but directive it is an array of strings. For directives it is an array of Tempcode objects. Actually there may be template-style parameters in here, as an influence of singular_bind and these may be Tempcode, but we ignore them.
 * @param  ID_TEXT $template_name The name of the template this came from (blank: not from a file / unknown); only passed for directives to avoid infinite loops with INCLUDE
 * @return mixed The result. Either Tempcode, or a string.
 */

function ecv(string $lang, array $escaped, int $type, string $name, array $param, string $template_name = '')