Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
JmesPath\Lexer Class Reference

Public Member Functions

 tokenize ($input)
 Tokenize the JMESPath expression into an array of tokens hashes that contain a 'type', 'value', and 'key'.
 

Public Attributes

const STATE_AND = 13
 
const STATE_EQ = 11
 
const STATE_GT = 10
 
const STATE_IDENTIFIER = 0
 
const STATE_JSON_LITERAL = 6
 
const STATE_LBRACKET = 7
 
const STATE_LT = 9
 
const STATE_NOT = 12
 
const STATE_NUMBER = 1
 
const STATE_PIPE = 8
 
const STATE_QUOTED_STRING = 5
 
const STATE_SINGLE_CHAR = 2
 
const STATE_STRING_LITERAL = 4
 
const STATE_WHITESPACE = 3
 
const T_AND = 'and'
 
const T_COLON = 'colon'
 
const T_COMMA = 'comma'
 
const T_COMPARATOR = 'comparator'
 
const T_CURRENT = 'current'
 
const T_DOT = 'dot'
 
const T_EOF = 'eof'
 
const T_EXPREF = 'expref'
 
const T_FILTER = 'filter'
 
const T_FLATTEN = 'flatten'
 
const T_IDENTIFIER = 'identifier'
 
const T_LBRACE = 'lbrace'
 
const T_LBRACKET = 'lbracket'
 
const T_LITERAL = 'literal'
 
const T_LPAREN = 'lparen'
 
const T_NOT = 'not'
 
const T_NUMBER = 'number'
 
const T_OR = 'or'
 
const T_PIPE = 'pipe'
 
const T_QUOTED_IDENTIFIER = 'quoted_identifier'
 
const T_RBRACE = 'rbrace'
 
const T_RBRACKET = 'rbracket'
 
const T_RPAREN = 'rparen'
 
const T_STAR = 'star'
 
const T_UNKNOWN = 'unknown'
 

Member Function Documentation

◆ tokenize()

JmesPath\Lexer::tokenize ( $input)

Tokenize the JMESPath expression into an array of tokens hashes that contain a 'type', 'value', and 'key'.

Parameters
string$inputJMESPath input
Return values
array
Exceptions
SyntaxErrorException

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