src/Leevel/View/Compiler.php
public function includeNodeCompiler(array &$theme): void
    {
        $this->checkNode($theme);
        $attr = $this->getNodeAttribute($theme);

        if (false === strpos($attr['file'], '(')) {
            // 后缀由主模板提供
            if (!$attr['ext'] && false !== strpos($attr['file'], '.')) {
                $temp = explode('.', $attr['file']);
                $attr['ext'] = '.'.array_pop($temp);
                $attr['file'] = implode('.', $temp);
            }

            if (0 !== strpos($attr['file'], '$')) {
                $attr['file'] = (0 === strpos($attr['file'], '$') ? '' : '\'').$attr['file'].'\'';
            }
        }

        $attr['file'] = $this->parseContentIf($attr['file']);

        $theme['content'] = $this->withPhpTag(
            '$this->display('.$attr['file'].
            ', [], \''.($attr['ext'] ?: '').
            '\', true);'
        );
    }
public function includeNodeCompiler(array &$theme): void
    {
        $this->checkNode($theme);
        $attr = $this->getNodeAttribute($theme);

        if (false === strpos($attr['file'], '(')) {
            // 后缀由主模板提供
            if (!$attr['ext'] && false !== strpos($attr['file'], '.')) {
                $temp = explode('.', $attr['file']);
                $attr['ext'] = '.'.array_pop($temp);
                $attr['file'] = implode('.', $temp);
            }

            if (0 !== strpos($attr['file'], '$')) {
                $attr['file'] = (0 === strpos($attr['file'], '$') ? '' : '\'').$attr['file'].'\'';
            }
        }

        $attr['file'] = $this->parseContentIf($attr['file']);

        $theme['content'] = $this->withPhpTag(
            '$this->display('.$attr['file'].
            ', [], \''.($attr['ext'] ?: '').
            '\', true);'
        );
    }
include.

@param array $theme