public function renderExpression($expression)
    {
        if (strpos($expression, '\\') !== false) {
            $expressionParts = explode(' ', $expression);
            $viewClass = '\\' . array_shift($expressionParts);

            /** @var UiInterface $newView */
            if (!class_exists($viewClass)) {
                return '<!-- view class ' . $viewClass . ' not found -->';
            }
            $newView = new $viewClass();
            if ($newView instanceof UiInterface) {
                $newView->setContext($this);
                if ($expressionParts) {
                    return call_user_func_array([$newView, 'render'], $expressionParts);
                }

                return $newView->render();
            }
            try {
                return (string)$newView;
            } catch (\Exception $exception) {
            }
        } else {
            if (substr($expression, 0, 2) === '//') { // Handle expressions like "{//please.output.me}"

            }
        }

        return $this->resolveExpressionKeyPath($expression);
    }
public function renderExpression($expression)
    {
        if (strpos($expression, '\\') !== false) {
            $expressionParts = explode(' ', $expression);
            $viewClass = '\\' . array_shift($expressionParts);

            /** @var UiInterface $newView */
            if (!class_exists($viewClass)) {
                return '<!-- view class ' . $viewClass . ' not found -->';
            }
            $newView = new $viewClass();
            if ($newView instanceof UiInterface) {
                $newView->setContext($this);
                if ($expressionParts) {
                    return call_user_func_array([$newView, 'render'], $expressionParts);
                }

                return $newView->render();
            }
            try {
                return (string)$newView;
            } catch (\Exception $exception) {
            }
        } else {
            if (substr($expression, 0, 2) === '//') { // Handle expressions like "{//please.output.me}"

            }
        }

        return $this->resolveExpressionKeyPath($expression);
    }
public function renderExpression ( $ expression ) { if ( strpos ( $ expression , '\\' ) !== false ) { $ expressionParts = explode ( ' ' , $ expression ) ; $ viewClass = '\\' . array_shift ( $ expressionParts ) ; /** @var UiInterface $newView */ if ( ! class_exists ( $ viewClass ) ) { return '<!-- view class ' . $ viewClass . ' not found -->' ; } $ newView = new $ viewClass ( ) ; if ( $ newView instanceof UiInterface ) { $ newView -> setContext ( $ this ) ; if ( $ expressionParts ) { return call_user_func_array ( [ $ newView , 'render' ] , $ expressionParts ) ; } return $ newView -> render ( ) ; } try { return ( string ) $ newView ; } catch ( \ Exception $ exception ) { } } else { if ( substr ( $ expression , 0 , 2 ) === '//' ) { // Handle expressions like "{//please.output.me}" } } return $ this -> resolveExpressionKeyPath ( $ expression ) ; }
Renders the given expression

@param string $expression
@return string
Renders the given expression