<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                * 配置 視圖view 依賴于smarty,需要composer安裝smarty,原則上swoolefy一般不作為視圖渲染的,定義為一個api框架 ``` composer require smarty/smarty ``` 在應用層配置文件中 ~~~ 'components' => [ // 第一種方式利用配置項設置 'view' => [ 'class' => 'Swoolefy\Core\View', ], // 第二種動態創建,更加靈活,推薦 'view' => function($com_name) { $view = new Swoolefy\Core\View(); return $view; } ] ~~~ * 獲取實例 在應用中 ~~~ $view = Application::getApp()->view; ~~~ 我們在控制器中使用 ~~~ $this->assign('name', $name); $this->assign('books', $books); $this->display('test.html'); ~~~ 其實就是通過view組件實例進行封裝的,例如在`Swoolefy\Core\AppTrait.php`中 ~~~ /** * assign * @param string $name * @param string|array $value * @return void */ public function assign($name,$value) { Application::getApp()->view->assign($name,$value); } /** * display * @param string $template_file * @return void */ public function display($template_file=null) { Application::getApp()->view->display($template_file); } /** * fetch * @param string $template_file * @return void */ public function fetch($template_file=null) { Application::getApp()->view->display($template_file); } /** * returnJson * @param array $data * @param string $formater * @return void */ public function returnJson($data,$formater = 'json') { Application::getApp()->view->returnJson($data,$formater); } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看