protected function _render($context = null)
    {
        if ($context === null) {
            throw $this->_createInvalidArgumentException(
                $this->__('Cannot render with a null context'),
                null,
                null,
                $context
            );
        }

        try {
            $expr = $this->_containerGet($context, ExprCtx::K_EXPRESSION);
            $result = $this->_renderExpression($expr, $context);

            return $result;
        } catch (NotFoundExceptionInterface $notFoundException) {
            throw $this->_createInvalidArgumentException(
                $this->__('Context does not contain an expression'),
                null,
                $notFoundException,
                $context
            );
        }
    }
protected function _render($context = null)
    {
        if ($context === null) {
            throw $this->_createInvalidArgumentException(
                $this->__('Cannot render with a null context'),
                null,
                null,
                $context
            );
        }

        try {
            $expr = $this->_containerGet($context, ExprCtx::K_EXPRESSION);
            $result = $this->_renderExpression($expr, $context);

            return $result;
        } catch (NotFoundExceptionInterface $notFoundException) {
            throw $this->_createInvalidArgumentException(
                $this->__('Context does not contain an expression'),
                null,
                $notFoundException,
                $context
            );
        }
    }
protected function _render ( $ context = null ) { if ( $ context === null ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Cannot render with a null context' ) , null , null , $ context ) ; } try { $ expr = $ this -> _containerGet ( $ context , ExprCtx :: K_EXPRESSION ) ; $ result = $ this -> _renderExpression ( $ expr , $ context ) ; return $ result ; } catch ( NotFoundExceptionInterface $ notFoundException ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Context does not contain an expression' ) , null , $ notFoundException , $ context ) ; } }
Renders the given context as an expression.

@since [*next-version*]

@param array|ArrayAccess|stdClass|ContainerInterface|null $context The render context. Must have at least a
TermInterface instance that corresponds
to the key {@see ExprCtx::K_EXPRESSION}.

@throws ContainerExceptionInterface If the context container encountered an error.
@throws NotFoundExceptionInterface  If the expression was not found in the context container.

@return string|Stringable The rendered result.
Renders the given context as an expression .