core/Controller.php
protected function hook(string $tplName, array $list = null, array $origFields = [], string $assign = 'rs')
    {
        if ($list == null) {
            $data = $this->getAssign();
            $list = (isset($data['list']) && is_array($data['list'])) ? $data['list'] : [];
        }
        if (!isset($list[0])) {
            return $list;
        }
        $this->fetch($tplName);
        $retList = [];
        $view = $this->view();
        $hookFunc = $view->getHook();
        foreach ($list as $item) {
            $column = [];
            foreach ($origFields as $key) {
                if (isset($item[$key])) {
                    $column[$key] = isset($item[$key]) ? $item[$key] : null;
                }
            }
            foreach ($hookFunc as $key => $func) {
                $column[$key] = call_user_func($func, [$assign => $item]);
            }
            $retList[] = $column;
        }
        return $retList;
    }
protected function hook(string $tplName, array $list = null, array $origFields = [], string $assign = 'rs')
    {
        if ($list == null) {
            $data = $this->getAssign();
            $list = (isset($data['list']) && is_array($data['list'])) ? $data['list'] : [];
        }
        if (!isset($list[0])) {
            return $list;
        }
        $this->fetch($tplName);
        $retList = [];
        $view = $this->view();
        $hookFunc = $view->getHook();
        foreach ($list as $item) {
            $column = [];
            foreach ($origFields as $key) {
                if (isset($item[$key])) {
                    $column[$key] = isset($item[$key]) ? $item[$key] : null;
                }
            }
            foreach ($hookFunc as $key => $func) {
                $column[$key] = call_user_func($func, [$assign => $item]);
            }
            $retList[] = $column;
        }
        return $retList;
    }
根据模板补丁修正输出数据
@param string $tplName
@param array|null $list
@param array $origFields
@param string $assign
@return array