getEvaluator example

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);
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.