public function evaluate(string $privilegeIdentifier, JoinPointInterface $joinPoint)
    {
        $functionName = $this->generateExpressionFunctionName($privilegeIdentifier);
        if (isset($this->runtimeExpressions[$functionName])) {
            return $this->runtimeExpressions[$functionName]->__invoke($joinPoint, $this->objectManager);
        }

        $expression = $this->runtimeExpressionsCache->get($functionName);

        if (!$expression) {
            throw new Exception('Runtime expression "' . $functionName . '" does not exist. Flushing the code caches may help to solve this.', 1428694144);
        }

        $this->runtimeExpressions[$functionName] = eval($expression);
        return $this->runtimeExpressions[$functionName]->__invoke($joinPoint, $this->objectManager);
    }
public function evaluate(string $privilegeIdentifier, JoinPointInterface $joinPoint)
    {
        $functionName = $this->generateExpressionFunctionName($privilegeIdentifier);
        if (isset($this->runtimeExpressions[$functionName])) {
            return $this->runtimeExpressions[$functionName]->__invoke($joinPoint, $this->objectManager);
        }

        $expression = $this->runtimeExpressionsCache->get($functionName);

        if (!$expression) {
            throw new Exception('Runtime expression "' . $functionName . '" does not exist. Flushing the code caches may help to solve this.', 1428694144);
        }

        $this->runtimeExpressions[$functionName] = eval($expression);
        return $this->runtimeExpressions[$functionName]->__invoke($joinPoint, $this->objectManager);
    }
public function evaluate ( string $ privilegeIdentifier , JoinPointInterface $ joinPoint ) { $ functionName = $ this -> generateExpressionFunctionName ( $ privilegeIdentifier ) ; if ( isset ( $ this -> runtimeExpressions [ $ functionName ] ) ) { return $ this -> runtimeExpressions [ $ functionName ] -> __invoke ( $ joinPoint , $ this -> objectManager ) ; } $ expression = $ this -> runtimeExpressionsCache -> get ( $ functionName ) ; if ( ! $ expression ) { throw new Exception ( 'Runtime expression "' . $ functionName . '" does not exist. Flushing the code caches may help to solve this.' , 1428694144 ) ; } $ this -> runtimeExpressions [ $ functionName ] = eval ( $ expression ) ; return $ this -> runtimeExpressions [ $ functionName ] -> __invoke ( $ joinPoint , $ this -> objectManager ) ; }
Evaluate an expression with the given JoinPoint

@param string $privilegeIdentifier MD5 hash that identifies a privilege
@param JoinPointInterface $joinPoint
@return mixed
@throws Exception
Evaluate an expression with the given JoinPoint