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

Static Public Member Functions

static cleanCompileDir ()
 Delete all previously compiled JMESPath files from the JP_COMPILE_DIR directory or sys_get_temp_dir().
 
static createRuntime ()
 Creates a JMESPath runtime based on environment variables and extensions available on a system.
 
static search ($expression, $data)
 Returns data from the input array that matches a JMESPath expression.
 

Public Attributes

const COMPILE_DIR = 'JP_PHP_COMPILE'
 

Member Function Documentation

◆ cleanCompileDir()

static JmesPath\Env::cleanCompileDir ( )
static

Delete all previously compiled JMESPath files from the JP_COMPILE_DIR directory or sys_get_temp_dir().

Return values
intReturns the number of deleted files.

◆ createRuntime()

static JmesPath\Env::createRuntime ( )
static

Creates a JMESPath runtime based on environment variables and extensions available on a system.

Return values
callable

◆ search()

static JmesPath\Env::search ( $expression,
$data )
static

Returns data from the input array that matches a JMESPath expression.

Parameters
string$expressionJMESPath expression to evaluate
mixed$dataJSON-like data to search
Return values
mixedReturns the matching data or null

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