Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
JmesPath\CompilerRuntime Class Reference

Public Member Functions

 __construct ($dir=null, ?Parser $parser=null)
 
 __invoke ($expression, $data)
 Returns data from the provided input that matches a given JMESPath expression.
 

Constructor & Destructor Documentation

◆ __construct()

JmesPath\CompilerRuntime::__construct ( $dir = null,
?Parser $parser = null )
Parameters
string | null$dirDirectory used to store compiled PHP files.
Parser | null$parserJMESPath parser to utilize
Exceptions
RuntimeExceptionif the cache directory cannot be created

Member Function Documentation

◆ __invoke()

JmesPath\CompilerRuntime::__invoke ( $expression,
$data )

Returns data from the provided input that matches a given JMESPath expression.

Parameters
string$expressionJMESPath expression to evaluate
mixed$dataData to search. This data should be data that is similar to data returned from json_decode using associative arrays rather than objects.
Return values
mixedReturns the matching data or null
Exceptions
RuntimeException

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