Expression/ExpressionEvaluator.php
public function registerFunction(ExpressionFunctionInterface $function)
    {
        $this->expressionLanguage->register(
            $function->getName(),
            $function->getCompiler(),
            $function->getEvaluator()
        );

        foreach ($function->getContextVariables() as $name => $value) {
            $this->setContextVariable($name, $value);
        }

        return $this;
    }
public function registerFunction(ExpressionFunctionInterface $function)
    {
        $this->expressionLanguage->register(
            $function->getName(),
            $function->getCompiler(),
            $function->getEvaluator()
        );

        foreach ($function->getContextVariables() as $name => $value) {
            $this->setContextVariable($name, $value);
        }

        return $this;
    }
public function registerFunction ( ExpressionFunctionInterface $ function ) { $ this -> expressionLanguage -> register ( $ function -> getName ( ) , $ function -> getCompiler ( ) , $ function -> getEvaluator ( ) ) ; foreach ( $ function -> getContextVariables ( ) as $ name => $ value ) { $ this -> setContextVariable ( $ name , $ value ) ; } return $ this ; }
Register a new new ExpressionLanguage function.

@param ExpressionFunctionInterface $function

@return ExpressionEvaluator
Register a new new ExpressionLanguage function .