throw new \
LogicException('Registering functions after calling evaluate(), compile() or parse() is not supported.'
);
} $this->functions
[$name] =
['compiler' =>
$compiler, 'evaluator' =>
$evaluator];
} /**
* @return void
*/
public function addFunction(ExpressionFunction
$function) { $this->
register($function->
getName(),
$function->
getCompiler(),
$function->
getEvaluator());
} /**
* @return void
*/
public function registerProvider(ExpressionFunctionProviderInterface
$provider) { foreach ($provider->
getFunctions() as $function) { $this->
addFunction($function);
} }