public function __construct(Parser $parser = null, callable $fnDispatcher = null) { $fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance(); $this->interpreter = new TreeInterpreter($fnDispatcher); $this->parser = $parser ?: new Parser(); }
/** * @param callable $fnDispatcher Function dispatching function that accepts * a function name argument and an array of * function arguments and returns the result. */ public function __construct(callable $fnDispatcher = null) { $this->fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance(); }