Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
Mustache_Tokenizer Class Reference

Public Member Functions

 scan ($text, $delimiters='')
 Scan and tokenize template source.
 

Public Attributes

const CTAG = 'ctag'
 
const END = 'end'
 
const FILTERS = 'filters'
 
const IN_TAG = 2
 
const IN_TAG_TYPE = 1
 
const IN_TEXT = 0
 
const INDENT = 'indent'
 
const INDEX = 'index'
 
const LINE = 'line'
 
const NAME = 'name'
 
const NODES = 'nodes'
 
const OTAG = 'otag'
 
const T_BLOCK_ARG = '$arg'
 
const T_BLOCK_VAR = '$'
 
const T_COMMENT = '!'
 
const T_DELIM_CHANGE = '='
 
const T_END_SECTION = '/'
 
const T_ESCAPED = '_v'
 
const T_INVERTED = '^'
 
const T_PARENT = '<'
 
const T_PARTIAL = '>'
 
const T_PRAGMA = '%'
 
const T_SECTION = '#'
 
const T_TEXT = '_t'
 
const T_UNESCAPED = '{'
 
const T_UNESCAPED_2 = '&'
 
const TYPE = 'type'
 
const VALUE = 'value'
 

Member Function Documentation

◆ scan()

Mustache_Tokenizer::scan ( $text,
$delimiters = '' )

Scan and tokenize template source.

Exceptions
Mustache_Exception_SyntaxExceptionwhen mismatched section tags are encountered
Mustache_Exception_InvalidArgumentExceptionwhen $delimiters string is invalid
Parameters
string$textMustache template source to tokenize
string$delimitersOptionally, pass initial opening and closing delimiters (default: empty string)
Return values
arraySet of Mustache tokens

The documentation for this class was generated from the following file: