PHP Class JmesPath\TreeInterpreter

Datei anzeigen Open project: mtdowling/jmespath.php Class Usage Examples

Public Methods

Method Description
__construct ( callable $fnDispatcher = null )
visit ( array $node, mixed $data ) : mixed Visits each node in a JMESPath AST and returns the evaluated result.

Private Methods

Method Description
dispatch ( array $node, $value ) : mixed Recursively traverses an AST using depth-first, pre-order traversal.
relativeCmp ( $left, $right, $cmp ) : boolean

Method Details

__construct() public method

public __construct ( callable $fnDispatcher = null )
$fnDispatcher callable Function dispatching function that accepts a function name argument and an array of function arguments and returns the result.

visit() public method

Visits each node in a JMESPath AST and returns the evaluated result.
public visit ( array $node, mixed $data ) : mixed
$node array JMESPath AST node
$data mixed Data to evaluate
return mixed