1. <tfoot id='SxxVU'></tfoot>
    <legend id='SxxVU'><style id='SxxVU'><dir id='SxxVU'><q id='SxxVU'></q></dir></style></legend>

      <bdo id='SxxVU'></bdo><ul id='SxxVU'></ul>
  2. <i id='SxxVU'><tr id='SxxVU'><dt id='SxxVU'><q id='SxxVU'><span id='SxxVU'><b id='SxxVU'><form id='SxxVU'><ins id='SxxVU'></ins><ul id='SxxVU'></ul><sub id='SxxVU'></sub></form><legend id='SxxVU'></legend><bdo id='SxxVU'><pre id='SxxVU'><center id='SxxVU'></center></pre></bdo></b><th id='SxxVU'></th></span></q></dt></tr></i><div id='SxxVU'><tfoot id='SxxVU'></tfoot><dl id='SxxVU'><fieldset id='SxxVU'></fieldset></dl></div>

    <small id='SxxVU'></small><noframes id='SxxVU'>

    1. 在 Zend Framework 2.0 的控制器中更改布局

      时间:2023-10-03
    2. <small id='ynMZ1'></small><noframes id='ynMZ1'>

      <tfoot id='ynMZ1'></tfoot>
    3. <i id='ynMZ1'><tr id='ynMZ1'><dt id='ynMZ1'><q id='ynMZ1'><span id='ynMZ1'><b id='ynMZ1'><form id='ynMZ1'><ins id='ynMZ1'></ins><ul id='ynMZ1'></ul><sub id='ynMZ1'></sub></form><legend id='ynMZ1'></legend><bdo id='ynMZ1'><pre id='ynMZ1'><center id='ynMZ1'></center></pre></bdo></b><th id='ynMZ1'></th></span></q></dt></tr></i><div id='ynMZ1'><tfoot id='ynMZ1'></tfoot><dl id='ynMZ1'><fieldset id='ynMZ1'></fieldset></dl></div>
        <tbody id='ynMZ1'></tbody>

          <legend id='ynMZ1'><style id='ynMZ1'><dir id='ynMZ1'><q id='ynMZ1'></q></dir></style></legend>
            • <bdo id='ynMZ1'></bdo><ul id='ynMZ1'></ul>
                本文介绍了在 Zend Framework 2.0 的控制器中更改布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在学习 ZF2.0 测试版.在 ZF1 中,我们可以在控制器中动态更改布局:

                I am learning ZF2.0 beta. In ZF1 we can change layout on the fly in controller:

                Zend_Layout::getMvcInstance()->setLayout('layoutname');
                

                但在 ZF2.0 ZendLayout 类中没有方法 getMvcInstance().我认为可以使用依赖注入来实现,但不确定.

                But in ZF2.0 ZendLayout class doesn't has method getMvcInstance(). I think that it can be made using dependency injections but not sure.

                推荐答案

                ZF2 正在大量开发中,不能保证现在的工作方式,当 ZF2 达到稳定状态时会是它的工作方式.

                The ZF2 is heavily under development and no guarantee can be made the way it works now, will be the way it works when ZF2 reaches a stable state.

                >

                但是,来自 ZendMvc 的新视图层最近已合并,因此您现在应该能够执行此操作(使用当前主控):

                However, the new view layer from ZendMvc is recently merged so you should be able to do this now (with current master):

                public function somethingAction () 
                {
                    // Do some intelligent work
                
                    $this->layout('layout/different');
                }
                

                这篇关于在 Zend Framework 2.0 的控制器中更改布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Zend 邮件 Gmail SMTP 下一篇:pcntl_fork 和 MySQL 连接消失了

                相关文章

                最新文章

                    <tfoot id='Jc2ML'></tfoot>
                  1. <legend id='Jc2ML'><style id='Jc2ML'><dir id='Jc2ML'><q id='Jc2ML'></q></dir></style></legend>

                    <small id='Jc2ML'></small><noframes id='Jc2ML'>

                    <i id='Jc2ML'><tr id='Jc2ML'><dt id='Jc2ML'><q id='Jc2ML'><span id='Jc2ML'><b id='Jc2ML'><form id='Jc2ML'><ins id='Jc2ML'></ins><ul id='Jc2ML'></ul><sub id='Jc2ML'></sub></form><legend id='Jc2ML'></legend><bdo id='Jc2ML'><pre id='Jc2ML'><center id='Jc2ML'></center></pre></bdo></b><th id='Jc2ML'></th></span></q></dt></tr></i><div id='Jc2ML'><tfoot id='Jc2ML'></tfoot><dl id='Jc2ML'><fieldset id='Jc2ML'></fieldset></dl></div>

                      <bdo id='Jc2ML'></bdo><ul id='Jc2ML'></ul>