public function getValueForOperand($expression)
    {
        if (is_array($expression)) {
            $result = [];
            foreach ($expression as $expressionEntry) {
                $result[] = $this->getValueForOperand($expressionEntry);
            }
            return $result;
        } elseif (is_numeric($expression)) {
            return $expression;
        } elseif ($expression === true) {
            return true;
        } elseif ($expression === false) {
            return false;
        } elseif ($expression === null) {
            return null;
        } elseif (strpos($expression, 'context.') === 0) {
            $objectAccess = explode('.', $expression, 3);
            $globalObjectsRegisteredClassName = $this->globalObjects[$objectAccess[1]];
            $globalObject = $this->objectManager->get($globalObjectsRegisteredClassName);
            $this->securityContext->withoutAuthorizationChecks(function () use ($globalObject, $objectAccess, &$globalObjectValue) {
                $globalObjectValue = $this->getObjectValueByPath($globalObject, $objectAccess[2]);
            });

            return $globalObjectValue;
        } else {
            return trim($expression, '"\'');
        }
    }
public function getValueForOperand($expression)
    {
        if (is_array($expression)) {
            $result = [];
            foreach ($expression as $expressionEntry) {
                $result[] = $this->getValueForOperand($expressionEntry);
            }
            return $result;
        } elseif (is_numeric($expression)) {
            return $expression;
        } elseif ($expression === true) {
            return true;
        } elseif ($expression === false) {
            return false;
        } elseif ($expression === null) {
            return null;
        } elseif (strpos($expression, 'context.') === 0) {
            $objectAccess = explode('.', $expression, 3);
            $globalObjectsRegisteredClassName = $this->globalObjects[$objectAccess[1]];
            $globalObject = $this->objectManager->get($globalObjectsRegisteredClassName);
            $this->securityContext->withoutAuthorizationChecks(function () use ($globalObject, $objectAccess, &$globalObjectValue) {
                $globalObjectValue = $this->getObjectValueByPath($globalObject, $objectAccess[2]);
            });

            return $globalObjectValue;
        } else {
            return trim($expression, '"\'');
        }
    }
public function getValueForOperand ( $ expression ) { if ( is_array ( $ expression ) ) { $ result = [ ] ; foreach ( $ expression as $ expressionEntry ) { $ result [ ] = $ this -> getValueForOperand ( $ expressionEntry ) ; } return $ result ; } elseif ( is_numeric ( $ expression ) ) { return $ expression ; } elseif ( $ expression === true ) { return true ; } elseif ( $ expression === false ) { return false ; } elseif ( $ expression === null ) { return null ; } elseif ( strpos ( $ expression , 'context.' ) === 0 ) { $ objectAccess = explode ( '.' , $ expression , 3 ) ; $ globalObjectsRegisteredClassName = $ this -> globalObjects [ $ objectAccess [ 1 ] ] ; $ globalObject = $ this -> objectManager -> get ( $ globalObjectsRegisteredClassName ) ; $ this -> securityContext -> withoutAuthorizationChecks ( function ( ) use ( $ globalObject , $ objectAccess , & $ globalObjectValue ) { $ globalObjectValue = $ this -> getObjectValueByPath ( $ globalObject , $ objectAccess [ 2 ] ) ; } ) ; return $ globalObjectValue ; } else { return trim ( $ expression , '"\'' ) ; } }
Returns the static value of the given operand, this might be also a global object

@param mixed $expression The expression string representing the operand
@return mixed The calculated value
Returns the static value of the given operand this might be also a global object