src/Controller.php
protected function show($viewPath = '', $viewParamData = [], $options = [])
    {

        // true 自定义路径
        $peg = isset($options['peg']) ? $options['peg'] : false;
        // 单个视图关闭调试模式
        $trace = isset($options['trace']) ? $options['trace'] : true;

        if (get('all')) {
            extract(get('all'), EXTR_OVERWRITE);
        }

        if (self::$assign) {
            // 模板阵列变量分解成为独立变量
            extract(self::$assign, EXTR_OVERWRITE);
        }

        if ($viewParamData) {
            // 模板阵列变量分解成为独立变量
            extract($viewParamData, EXTR_OVERWRITE);
        }

        if (!$peg) {
            if (!$viewPath) {
                $path = VIEW_PATH . str_replace('.', DS, MODULE) . DS . parseName(CONTROLLER, false) . DS . ACTION . '.html';
            }
            //绝对路径
            elseif (stripos($viewPath, '/') === 0) {
                $path = VIEW_PATH . substr($viewPath, 1) . '.html';
            }
            //相对路径
            else {
                $path = VIEW_PATH . str_replace('.', DS, MODULE) . DS . $viewPath . '.html';
            }
        } else {
            $path = $viewPath;
        }

        if (!is_file($path)) {
            throw new Exception('视图地址:' . $path . '不存在 ');
        }

        $cachePath = DATA_TPL_PATH . md5($path) . '.php';

        ob_start();
        // 开启页面缓存
        if (is_file($cachePath) && filemtime($path) == filemtime($cachePath) && !config('debug')) {
            include $cachePath;
        } else {
            // 处理视图模板
            $template = new Template($path);
            $template->getContent();
            include $template->loadPath;
        }

        $content = ob_get_clean();

        // 标签翻译功能
        if (config('tag_trans')) {
            $content = $this->tagTrans($content);
        }

        echo $content;

        // 模块debug功能
        if (config('trace') && $trace) {
            Trace::run();
        }
    }
protected function show($viewPath = '', $viewParamData = [], $options = [])
    {

        // true 自定义路径
        $peg = isset($options['peg']) ? $options['peg'] : false;
        // 单个视图关闭调试模式
        $trace = isset($options['trace']) ? $options['trace'] : true;

        if (get('all')) {
            extract(get('all'), EXTR_OVERWRITE);
        }

        if (self::$assign) {
            // 模板阵列变量分解成为独立变量
            extract(self::$assign, EXTR_OVERWRITE);
        }

        if ($viewParamData) {
            // 模板阵列变量分解成为独立变量
            extract($viewParamData, EXTR_OVERWRITE);
        }

        if (!$peg) {
            if (!$viewPath) {
                $path = VIEW_PATH . str_replace('.', DS, MODULE) . DS . parseName(CONTROLLER, false) . DS . ACTION . '.html';
            }
            //绝对路径
            elseif (stripos($viewPath, '/') === 0) {
                $path = VIEW_PATH . substr($viewPath, 1) . '.html';
            }
            //相对路径
            else {
                $path = VIEW_PATH . str_replace('.', DS, MODULE) . DS . $viewPath . '.html';
            }
        } else {
            $path = $viewPath;
        }

        if (!is_file($path)) {
            throw new Exception('视图地址:' . $path . '不存在 ');
        }

        $cachePath = DATA_TPL_PATH . md5($path) . '.php';

        ob_start();
        // 开启页面缓存
        if (is_file($cachePath) && filemtime($path) == filemtime($cachePath) && !config('debug')) {
            include $cachePath;
        } else {
            // 处理视图模板
            $template = new Template($path);
            $template->getContent();
            include $template->loadPath;
        }

        $content = ob_get_clean();

        // 标签翻译功能
        if (config('tag_trans')) {
            $content = $this->tagTrans($content);
        }

        echo $content;

        // 模块debug功能
        if (config('trace') && $trace) {
            Trace::run();
        }
    }
[show description]
@date   2018-06-25T20:37:55+0800
@author ChenMingjiang
@param  string                   $viewPath       [视图地址]
@param  array                    $viewParamData  [渲染变量值]
@param  array                    $options        [预定义参数]
@return [type]                                   [description]