2018-11-24 10:13:26 1500次浏览 1条回答 0 悬赏 10 金钱

在控制器中把数据发送到视图我们总是用类似的方法:

return $this->render();

我想知道这里返回值的类型到底是什么呢?是一个对象吗?
谢谢!

最佳答案

  • ╃巡洋艦㊣ 发布于 2018-11-24 10:25 举报
    /** 
     * @param string $view the view name.
     * @param array $params the parameters (name-value pairs) that should be made available in the view.
     * These parameters will not be available in the layout.
     * @return string the rendering result.
     * @throws InvalidArgumentException if the view file or the layout file does not exist.
     */
    public function render($view, $params = [])
    {
        $content = $this->getView()->render($view, $params, $this);
        return $this->renderContent($content);
    }
    

    return string 类型。

    没有找到数据。
您需要登录后才可以回答。登录 | 立即注册
sk811229
经理

sk811229

注册时间:2018-05-23
最后登录:2022-10-06
在线时长:16小时47分
  • 粉丝0
  • 金钱770
  • 威望10
  • 积分1030

热门问题