Function __global->template_to_tempcode

Definitions

sources/tempcode_compiler.php

  • Convert template text into Tempcode format.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: N/A

Parameters

Name Type Default Set Range Description
$text string required parameter N/A N/A The template text
$symbol_pos integer 0 N/A N/A The position we are looking at in the text
$inside_directive boolean False N/A N/A Whether this text is in fact a directive, about to be put in the context of a wider template
$codename ID_TEXT Blank (empty string) N/A N/A The codename of the template (blank: not from a file)
$theme ?ID_TEXT Null N/A N/A The theme it is for (null: current theme)
$lang ?ID_TEXT Null N/A N/A The language it is for (null: current language)
$tolerate_errors boolean False N/A N/A Whether to tolerate errors
$parameters ?array Null N/A N/A Parameters to hard-code in during compilation (null: no hard-coding)
$suffix ?string Null N/A N/A File type suffix of template file (e.g. .tpl) (null: not from a file)
$directory ?string Null N/A N/A Subdirectory type to look in. Surrounded by '/', unlike with $directory parameters to most other functions (performance reasons) (null: not from a file)

Return

  • The converted/compiled template as Tempcode, OR if a directive, encoded directive information
  • Type: mixed
  • Set: N/A
  • Range: N/A