src/Leevel/View/Compiler.php
protected function encodeContent(string $content, string $type = ''): string
    {
        if ('global' === $type) {
            $content = Parser::globalEncode($content);
        } elseif (in_array($type, ['revert', 'include'], true)) {
            $content = base64_decode($content, true);
        } else {
            $content = Parser::revertEncode($content);
        }

        return $content;
    }
protected function encodeContent(string $content, string $type = ''): string
    {
        if ('global' === $type) {
            $content = Parser::globalEncode($content);
        } elseif (in_array($type, ['revert', 'include'], true)) {
            $content = base64_decode($content, true);
        } else {
            $content = Parser::revertEncode($content);
        }

        return $content;
    }
编码内容.

@param string $content
@param string $type

@return string