AstRuntime
in package
Uses an external tree visitor to interpret an AST.
Table of Contents
- $cache : mixed
- $cachedCount : mixed
- $interpreter : mixed
- $parser : mixed
- __construct() : mixed
- __invoke() : mixed
- Returns data from the provided input that matches a given JMESPath expression.
Properties
$cache
private
mixed
$cache
= []
$cachedCount
private
mixed
$cachedCount
= 0
$interpreter
private
mixed
$interpreter
$parser
private
mixed
$parser
Methods
__construct()
public
__construct([Parser $parser = null ][, callable $fnDispatcher = null ]) : mixed
Parameters
- $parser : Parser = null
- $fnDispatcher : callable = null
Return values
mixed —__invoke()
Returns data from the provided input that matches a given JMESPath expression.
public
__invoke(string $expression, mixed $data) : mixed
Parameters
- $expression : string
-
JMESPath expression to evaluate
- $data : mixed
-
Data to search. This data should be data that is similar to data returned from json_decode using associative arrays rather than objects.
Return values
mixed —Returns the matching data or null