src/MVC/View.php
private function wrapContent($content, $encode = true)
    {
        if (!empty($this->wrap_stack)) {
            $stack_top = &$this->wrap_stack[0];
            if (isset($stack_top[1]['@content']) && $stack_top[2]) {
                $content .= $stack_top[1]['@content'];
            } else if (isset($stack_top[1]['@content'])) {
                $content = $stack_top[1]['@content'] . $content;
            }

            $stack_top[1]['@content'] = $content;
            return $this->buildWrapTags($this->wrap_stack);
        } else if ($encode) {
            return htmlentities($content, ENT_IGNORE);
        } else {
            return $content;
        }
    }
private function wrapContent($content, $encode = true)
    {
        if (!empty($this->wrap_stack)) {
            $stack_top = &$this->wrap_stack[0];
            if (isset($stack_top[1]['@content']) && $stack_top[2]) {
                $content .= $stack_top[1]['@content'];
            } else if (isset($stack_top[1]['@content'])) {
                $content = $stack_top[1]['@content'] . $content;
            }

            $stack_top[1]['@content'] = $content;
            return $this->buildWrapTags($this->wrap_stack);
        } else if ($encode) {
            return htmlentities($content, ENT_IGNORE);
        } else {
            return $content;
        }
    }
处理带wrap的HTML

@param string $content
@param bool $encode 是否转码
@return mixed